Part Number Hot Search : 
CJSE062 ADF4007 C2233 CXP82500 400SR16B SDA2030 ON0148 NTE17
Product Description
Full Text Search
 

To Download DS31256 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  1 of 182 rev: 073103 note: some revisions of this device may incorporate deviations from published specifications known as errata. multiple revisions of any device may be simultaneously available through various sales channels. for information about device errata, click here: www.maxim-ic.com/errata . general description the DS31256 envoy is a 256-channel hdlc controller capable of handling up to 60 t1 or 64 e1 data streams or two t3 data streams. each of the 16 physical ports can handle one, two, or four t1 or e1 data streams. the envoy is composed of the following blocks: layer 1, hdlc processing, fifo, dma, pci bus, and local bus. there are 16 hdlc engines (one for each port) that are each capable of operating at speeds up to 8.192mbps in channelized mode and up to 10mbps in unchannelized mode. the envoy also has three fast hdlc engines that only reside on ports 0, 1, and 2. they are capable of operating at speeds up to 52mbps. applications channelized and clear-channel (unchannelized) t1/e1 and t3/e3 routers with multilink ppp support high-density frame-relay access xdsl access multiplexers (dslams) triple hssi high-density v.35 sonet/sdh eoc/ecc termination ordering information part temp range pin-package DS31256 0c to +70c 256 pbga features  256 independent, bidirectional hdlc channels  up to 132mbps full-duplex throughput  supports up to 60 t1 or 64 e1 data streams  16 physical ports (16 tx and 16 rx) that can be independently configured for channelized or unchannelized operation  three fast (52mbps) ports; other ports capable of speeds up to 10mbps (unchannelized)  channelized ports can each handle one, two, or four t1 or e1 lines  per-channel ds0 loopbacks in both directions  over-subscription at the port level  transparent mode supported  on-board bit error-rate tester (bert) with automatic error insertion capability  bert function can be assigned to any hdlc channel or any port  large 16kb fifo in both receive and transmit directions  efficient scatter/gather dma maximizes memory efficiency  receive data packets are time-stamped  transmit packet priority setting  v.54 loopback code detector  local bus allows for pci bridging or local access  intel or motorola bus signals supported  backward compatibility with ds3134  33mhz 32-bit pci (v2.1) interface  3.3v low-power cmos with 5v tolerant i/o  jtag support ieee 1149.1  256-pin plastic bga (27mm x 27mm) features continued on page 6. DS31256 256-channel, high-throughput hdlc controlle r www.maxim-ic.com demo kit available
DS31256 256-channel, high-thro ughput hdlc controller 2 of 182 table of contents 1. main features .................................................................................................................. ...... 6 2. detailed description........................................................................................................ 7 3. signal description ........................................................................................................... 13 3.1 o verview /s ignal l ist .............................................................................................................................. 1 3 3.2 s erial p ort i nterface s ignal d escription ......................................................................................... 18 3.3 l ocal b us s ignal d escription .............................................................................................................. 19 3.4 jtag s ignal d escription ....................................................................................................................... 22 3.5 pci b us s ignal d escription ................................................................................................................... 22 3.6 pci e xtension s ignals ............................................................................................................................ 25 3.7 s upply and t est s ignal d escription .................................................................................................... 25 4. memory map ..................................................................................................................... ..... 26 4.1 i ntroduction ............................................................................................................................... ............. 26 4.2 g eneral c onfiguration r egisters (0 xx ) ............................................................................................ 26 4.3 r eceive p ort r egisters (1 xx ) ................................................................................................................ 27 4.4 t ransmit p ort r egisters (2 xx ).............................................................................................................. 27 4.5 c hannelized p ort r egisters (3 xx ) ....................................................................................................... 28 4.6 hdlc r egisters (4 xx ) ............................................................................................................................. 2 9 4.7 bert r egisters (5 xx ).............................................................................................................................. 29 4.8 r eceive dma r egisters (7 xx )................................................................................................................ 29 4.9 t ransmit dma r egisters (8 xx )............................................................................................................. 30 4.10 fifo r egisters (9 xx ) ........................................................................................................................... 30 4.11 pci c onfiguration r egisters for f unction 0 (pidsel/a xx ) ...................................................... 31 4.12 pci c onfiguration r egisters for f unction 1 (pidsel/b xx ) ...................................................... 31 5. general device configuratio n and status/interrupt ............................ 32 5.1 m aster r eset and id r egister d escription ....................................................................................... 32 5.2 m aster c onfiguration r egister d escription .................................................................................... 32 5.3 s tatus and i nterrupt ............................................................................................................................. 34 5.3.1 general description of operation ............................................................................................... ....... 34 5.3.2 status and interrupt re gister description ...................................................................................... .... 37 5.4 t est r egister d escription ..................................................................................................................... 43 6. layer 1 ........................................................................................................................ .............. 44 6.1 g eneral d escription ............................................................................................................................... 44 6.2 p ort r egister d escriptions ................................................................................................................... 48 6.3 l ayer 1 c onfiguration r egister d escription ................................................................................... 51 6.4 r eceive v.54 d etector ............................................................................................................................ 56 6.5 bert........................................................................................................................... ................................ 60 6.6 bert r egister d escription ................................................................................................................... 61 7. hdlc........................................................................................................................... ................. 67 7.1 g eneral d escription ............................................................................................................................... 67 7.2 hdlc r egister d escription ................................................................................................................... 69 8. fifo........................................................................................................................... ................... 74 8.1 g eneral d escription and e xample ...................................................................................................... 74 8.1.1 receive high wa termark ......................................................................................................... ........... 76 8.1.2 transmit low watermark ......................................................................................................... .......... 76 8.2 fifo r egister d escription ..................................................................................................................... 76 9. dma............................................................................................................................ .................. 83 9.1 i ntroduction ............................................................................................................................... ............. 83 9.2 r eceive s ide ............................................................................................................................... ............... 85 9.2.1 overview ....................................................................................................................... ...................... 85 9.2.2 packet desc riptors............................................................................................................. ................. 90 9.2.3 free queue ..................................................................................................................... .................... 92
DS31256 256-channel, high-thro ughput hdlc controller 3 of 182 9.2.4 done queue ..................................................................................................................... ................... 97 9.2.5 dma channel configuration ram .................................................................................................. 102 9.3 t ransmit s ide ............................................................................................................................... ........... 105 9.3.1 overview ....................................................................................................................... .................... 105 9.3.2 packet desc riptors............................................................................................................. ............... 114 9.3.3 pending queue.................................................................................................................. ................ 116 9.3.4 done queue ..................................................................................................................... ................. 120 9.3.5 dma configuration ram .......................................................................................................... ....... 125 10. pci bus........................................................................................................................ .............. 130 10.1 g eneral d escription of o peration ................................................................................................ 130 10.1.1 pci read cycle................................................................................................................. ................ 131 10.1.2 pci write cycle ................................................................................................................ ................ 132 10.1.3 pci bus arbi tration ............................................................................................................ .............. 133 10.1.4 pci initiato r abort............................................................................................................ ................ 133 10.1.5 pci target retry............................................................................................................... ................ 134 10.1.6 pci target disconnect .......................................................................................................... ........... 134 10.1.7 pci target abort ............................................................................................................... ............... 135 10.1.8 pci fast back-to-back .......................................................................................................... ........... 136 10.2 pci c onfiguration r egister d escription ..................................................................................... 137 10.2.1 command bits (pcmd0)........................................................................................................... ....... 138 10.2.2 status bits (pcmd0)............................................................................................................ ............. 139 10.2.3 command bits (pcmd1)........................................................................................................... ....... 143 10.2.4 status bits (pcmd1)............................................................................................................ ............. 144 11. local bus ...................................................................................................................... ........ 147 11.1 g eneral d escription ........................................................................................................................ 147 11.1.1 pci bridge mode ................................................................................................................ .............. 149 11.1.2 configura tion mode............................................................................................................. ............. 151 11.2 l ocal b us b ridge m ode c ontrol r egister d escription ........................................................... 153 11.3 e xamples of b us t iming for l ocal b us pci b ridge m ode o peration ..................................... 155 12. jtag........................................................................................................................... ................ 163 12.1 jtag d escription .............................................................................................................................. 1 63 12.2 tap c ontroller s tate m achine d escription .............................................................................. 164 12.3 i nstruction r egister and i nstructions ....................................................................................... 166 12.4 t est r egisters ............................................................................................................................... ..... 167 13. ac characteristics........................................................................................................ 168 14. revision history .............................................................................................................. 1 75 15. package information................................................................................................... 176 16. thermal characteristics......................................................................................... 177 17. applications ................................................................................................................... .... 178 17.1 16 p ort t1 or e1 with 256 hdlc c hannel s upport .................................................................... 179 17.2 d ual t3 with 256 hdlc c hannel s upport ................................................................................... 180 17.3 s ingle t3 with 512 hdlc c hannel s upport ................................................................................. 181 17.4 s ingle t3 with 672 hdlc c hannel s upport ................................................................................. 182
DS31256 256-channel, high-thro ughput hdlc controller 4 of 182 list of figures figure 2-1. bl ock diagram ...................................................................................................... ................................. 10 figure 5-1. status register bl ock diagram for sm and sv54...................................................................... ........... 36 figure 6-1. layer 1 block diagram.............................................................................................. ............................ 46 figure 6-2. port timing (channelized and unchannelized applications) ........................................................... .... 47 figure 6-3. layer 1 register set............................................................................................... ................................ 51 figure 6-4. port ram indirect access ........................................................................................... .......................... 53 figure 6-5. receive v. 54 host algorithm........................................................................................ ........................ 58 figure 6-6. receive v.54 state machine......................................................................................... ......................... 59 figure 6-7. bert mux diagram................................................................................................... ........................... 60 figure 6-8. bert register set.................................................................................................. ............................... 61 figure 8-1. fifo example....................................................................................................... ................................. 75 figure 9-1. receive dma operation .............................................................................................. ......................... 88 figure 9-2. receive dma memory orga nization.................................................................................... ................ 89 figure 9-3. receive de scriptor example......................................................................................... ......................... 90 figure 9-4. receive p acket descriptors......................................................................................... ........................... 91 figure 9-5. receive free-queue descriptor ...................................................................................... ....................... 92 figure 9-6. receive fr ee-queue structure ....................................................................................... ........................ 94 figure 9-7. receive d one-queue descriptor ...................................................................................... ..................... 97 figure 9-8. receive done-queue structure....................................................................................... ....................... 99 figure 9-9. receive dma configuration ram...................................................................................... ............... 102 figure 9-10. transmit dma operation............................................................................................ ...................... 108 figure 9-11. transmit dma memory orga nization .................................................................................. ............ 109 figure 9-12. transmit dma packet handling ...................................................................................... ................. 110 figure 9-13. transmit dma pr iority packet handling ............................................................................. ............. 111 figure 9-14. transmit dma e rror recovery algorithm ............................................................................. .......... 113 figure 9-15. transmit de scriptor example ....................................................................................... ..................... 114 figure 9-16. transmit pa cket descriptors ....................................................................................... ....................... 115 figure 9-17. transmit pe nding-queue descriptor ................................................................................. ................ 116 figure 9-18. transmit pe nding-queue structure.................................................................................. .................. 118 figure 9-19. transmit do ne-queue descriptor.................................................................................... .................. 120 figure 9-20. transmit do ne-queue structure ..................................................................................... ................... 122 figure 9-21. transmit dma configuration ram .................................................................................... ............. 125 figure 10-1. pci config uration memo ry map...................................................................................... ................. 130 figure 10-2. pci bus read...................................................................................................... ............................... 131 figure 10-3. pci bus write..................................................................................................... ............................... 132 figure 10-4. pci bus arbitr ation signaling protocol............................................................................ ................. 133 figure 10-5. pci initiator abort ............................................................................................... .............................. 133 figure 10-6. pci target retry.................................................................................................. .............................. 134 figure 10-7. pci target disconnect............................................................................................. .......................... 134 figure 10-8. pci target abort.................................................................................................. .............................. 135 figure 10-9. pci fast back-to-back ............................................................................................. ........................ 136 figure 11-1. bridge mode ....................................................................................................... ............................... 148 figure 11-2. bridge mode with arbitration enabled .............................................................................. ............... 148 figure 11-3. conf iguratio n mode................................................................................................ ........................... 149 figure 11-4. local bus access flowchart........................................................................................ ...................... 152 figure 11-5. 8-bit read cycle.................................................................................................. .............................. 155 figure 11-6. 16-bit write cycle................................................................................................ ............................. 156 figure 11-7. 8-bit read cycle.................................................................................................. .............................. 157 figure 11-8. 16-bit write (only upper 8 bits active) cycle ..................................................................... ........... 158 figure 11-9. 8-bit read cycle.................................................................................................. .............................. 159 figure 11-10. 8-bit write cycle................................................................................................ ............................. 160 figure 11-11. 16-bit read cycle................................................................................................ ............................ 161
DS31256 256-channel, high-thro ughput hdlc controller 5 of 182 figure 11-12. 8-bit write cycle................................................................................................ ............................. 162 figure 12-1. bl ock diagram ..................................................................................................... .............................. 163 figure 12-2. tap contro ller state machine...................................................................................... ..................... 164 figure 13-1. layer 1 port ac timing diagram .................................................................................... ................. 169 figure 13-2. local bus bridge mode (lms = 0) ac timing diagram................................................................. 170 figure 13-3. local bus configuration mode (lms = 1) ac timing diagrams.................................................... 172 figure 13-4. local bus configuration mode (lms = 1) ac timing di agrams (continued) ................................ 173 figure 13-5. pci bus interf ace ac timing diagram............................................................................... .............. 174 figure 13-6. jtag test port in terface ac timing diagram........................................................................ ......... 175 figure 16-1. 27mm x 27mm pbga with 256 balls, 2oz planes, +70  c ambient, under natural convection at 3.0w ........................................................................................................................... ..................................... 177 figure 17-1. application drawing key ........................................................................................... ....................... 178 figure 17-2. single t1 /e1 line connection...................................................................................... ..................... 178 figure 17-3. quad t1/e1 connection ............................................................................................. ....................... 179 figure 17-4. 16-port t1 application ............................................................................................ .......................... 179 figure 17-5. dual t3 application ............................................................................................... ........................... 180 figure 17-6. t3 application (512 hdlc channels)................................................................................ .............. 181 figure 17-7. t3 application (672 hdlc channels)................................................................................ .............. 182 list of tables table 1-a. data sheet definitions.............................................................................................. ................................ 7 table 2-a. restrictions........................................................................................................ ..................................... 11 table 2-b. initia lization steps ................................................................................................ .................................. 12 table 2-c. indirect registers.................................................................................................. .................................. 12 table 3-a. signal description .................................................................................................. ................................ 13 table 3-b. rs sampled edge ..................................................................................................... .............................. 18 table 3-c. ts sampled edge ..................................................................................................... .............................. 19 table 4-a. memory map organization ............................................................................................. ....................... 26 table 6-a. channelized port modes .............................................................................................. .......................... 44 table 6-b. receive v.54 search routine......................................................................................... ........................ 57 table 7-a. receive hdlc pack et processing outcomes ............................................................................. ........... 67 table 7-b. receive hdlc functions.............................................................................................. ......................... 68 table 7-c. transmit hdlc functions ............................................................................................. ........................ 68 table 8-a. fifo prior ity algorith m select...................................................................................... ........................ 74 table 9-a. dma registers to be configured by the host on power-up .............................................................. ... 84 table 9-b. receive dma main operat ional areas .................................................................................. ............... 86 table 9-c. receive descriptor address storage .................................................................................. .................... 90 table 9-d. receive free-queue read/write pointer absolute ad dress calculation............................................... 93 table 9-e. receive free-queue internal addr ess storage ......................................................................... .............. 93 table 9-f. receive done-queue internal addr ess storage......................................................................... ............. 98 table 9-g. transmit dma main operat ional areas................................................................................. ............. 106 table 9-h. done-queue error-status conditions.................................................................................. ................. 112 table 9-i. transmit descri ptor address storage ................................................................................. ................... 114 table 9-j. transmit pending-queu e internal addr ess storage ..................................................................... ......... 117 table 9-k. transmit done-queue internal address storage ........................................................................ ......... 121 table 11-a. local bus signals.................................................................................................. ............................. 147 table 11-b. local bus 8-bit width address, lbhe setting................................................................................. 150 table 11-c. local bus 16-bit width address, ld, lbhe setting........................................................................ 150 table 12-a. instruction codes.................................................................................................. .............................. 166 table 16-a. thermal proper ties, natural convection............................................................................. ............... 177 table 16-b. thermal properties vs. airflow ..................................................................................... ..................... 177
DS31256 256-channel, high-thro ughput hdlc controller 6 of 182 1. main features  layer 1 can simultaneously support up to 60 t1 or 64 e1 data streams, or two t3 data streams 16 independent physical ports capable of speeds up to 10mhz; three ports are also capable of speeds up to 52mhz each port can be independently configured for either channelized or unchannelized operation each physical channelized port can handle one, two, or four t1 or e1 data streams supports n x 64kbps and n x 56kbps on-board v.54 loopback detector on-board bert generation and detection per ds0 channel loopback in both directions unchannelized loopbacks in both directions  hdlc 256 independent channels up to 132mbps throughput in both the receive and transmit directions transparent mode three fast hdlc controllers capable of operating up to 52 mhz automatic flag detection and generation shared opening and closing flag interfame fill zero stuffing and destuffing crc16/32 checking and generation abort detection and generation crc error and long/short frame error detection invert clock invert data  fifo large 16kb receive and 16kb transmit buffers maximize pci bus efficiency small block size of 16 bytes allows maximum flexibility programmable low and high watermarks programmable hdlc channel priority setting  dma efficient scatter-gather dma minimizes system memory utilization programmable small and large buffer sizes up to 8188 bytes and algorithm select descriptor bursting to conserve pci bus bandwidth identical receive and transmit descriptors minimize host processing in store-and- forward automatic channel disabling and enabling on transmit errors receive packets are timestamped transmit packet priority setting  pci bus 32-bit, 33mhz version 2.1 compliant contains extension signals that allow adoption to custom buses can burst up to 256 32-bit words to maximize bus efficiency  local bus can be bridged from the pci bus to simplify system design, or a configuration bus can arbitrate for the bus when in bridge mode configurable as 8 or 16 bits wide supports a 1mb address space when in bridge mode supports intel and motorola bus timing  jtag test access  3.3v low-power cmos with 5v tolerant i/os  256-pin plastic bga package (27mm x 27mm) governing specifications the DS31256 fully meets the following specifications:  ansi (american national standards institute) t1.403-1995 network-to-customer installation ds1 metallic interface march 21, 1995  pci local bus specification v2.1 june 1, 1995  itu q.921 march 1993  iso standard 3309-1979 data communications ?hdlc procedures?frame structure
DS31256 256-channel, high-thro ughput hdlc controller 7 of 182 table 1-a. data sheet definitions the following terms are used throughout this data sheet. note: the DS31256?s ports are numbered 0 to 255; the hdlc channels are numbered 1 to 256. hdlc channel 1 is always associated w ith port 0, hdlc channel 2 with port 1, and so on. term definition bert bit error-rate tester descriptor a message passed back and forth between the dma and the host dword double word; a 32-bit data entity dma direct memory access fifo first in, first out. a temporary memory storage scheme. hdlc high-level data-link control host the main controller that resides on the pci bus. n/a not assigned v.54 a pseudorandom pattern that controls loopbacks (see ansi t1.403) 2. detailed description this data sheet is broken into sections de tailing each of the DS31256 envoy?s blocks. see figure 2-1 for a block diagram. the layer 1 block handles the physical input and output of serial data to and from the DS31256. the DS31256 can handle up to 60 t1 or 64 e1 data streams or two t3 data streams simultaneously. each of the 16 physical ports can handle up to two or four t1 or e1 data streams. section 17 details a few common applications for the DS31256. the layer 1 bl ock prepares the incoming data for the hdlc block and grooms data from the hdlc block for tr ansmission. the block can perform both channelized and unchannelized loopbacks as well as search for v.54 l oop patterns. it is in the layer 1 block that the host enables hdlc channels and assigns them to a particular port and/or ds0 channel(s). the host assigns hdlc channels through the r[n]cfg[j] and t[n]cfg[j] registers, which are described in section 6.3 . the layer 1 block interfaces directly to the bert block. the bert block can generate and detect both pseudorandom and repeatin g bit patterns, and is used to test and stress data communication links. the hdlc block consists of two types of hdlc cont rollers. there are 16 slow hdlc engines (one for each port) that are capable of operating at spee ds up to 8.192mbps in channelized mode and up to 10mbps in unchannelized mode. there are also three fast hdlc engines, which only reside on ports 0, 1, and 2 and they are capable of operating at speeds up to 52mbps. via the rp[n]cr and tp[n]cr registers in the layer 1 block, the host configures po rts 0, 1, and 2 to use either the slow or the fast hdlc engine. the hdlc engines perform all of the layer 2 processing, including zero stuffing and destuffing, flag generation and detection, crc genera tion and checking, abort generation and checking. in the receive path, the following process occurs. the hdlc engines collect the incoming data into 32-bit dwords and then signal the fifo that the engine has data to transfer to the fifo. the 16 ports are priority decoded (port 0 gets the highest priority) for the transfer of data from the hdlc engines to the fifo block. please note that in a channelized app lication, a single port may contain up to 128 hdlc channels and since hdlc channel numbers can be assigned randomly, the hdlc channel number has no bearing on the priority of this data transfer. this situation is of no real concern however since the
DS31256 256-channel, high-thro ughput hdlc controller 8 of 182 DS31256 has been designed to handle up to 132mbps in both the receive and transmit directions without any potential loss of data due to priority conflicts in the transfer of data from the hdlc engines to the fifo and vice versa. the fifo transfers data from the hdlc engines into the fifo and checks to see if the fifo has filled to beyond the programmable high watermark. if it has, then the fifo signals to the dma that data is ready to be burst read from the fifo to the pci bus. th e fifo block controls the dma block and it tells the dma when to transfer data from the fifo to the pci bus. since the DS31256 can handle multiple hdlc channels, it is quite possible that at any one time, several hdlc channels will need to have data transferred from the fifo to the pci bus. the fifo determines which hdlc channel the dma will handle next via a host configurable algorithm, which allows the selection to be either round robin or priority, decoded (with hdlc channel 1 getting the high est priority). depending on the application, the selection of this algorithm can be quite important. the DS31256 cannot control when it will be granted pci bus access and if bus access is restricted, then the host may wish to prioritize which hdlc channels get top priority access to the pci bus when it is granted to the DS31256. when the dma transfers data from the fifo to the pci bus, it burst reads all available data in the fifo (even if the fifo contains multiple hdlc packets) and tries to empty the fifo. if an incoming hdlc packet is not large enough to fill the fifo to the high watermark, then the fifo will not wait for more data to enter the fifo, it will signal the dma that an end-of-frame (eof) was det ected and that data is ready to be transferred from the fifo to the pci bus by the dma. in the transmit path, a very similar process occurs. as soon as a hdlc channel is enabled, the hdlc (layer 2) engines begin requesting data from the fi fo. like the receive side, the 16 ports are priority decoded with port 0 generally getting the highest priority. hence, if multiple ports are requesting packet data, the fifo will first satisfy the requirements on all the enabled hdlc channels in the lower numbered ports before moving on to the higher numbere d ports. again there is no potential loss of data as long as the transmit throughput maximum of 132mbps is not exceeded. when the fifo detects that a hdlc engine needs data, it then transfers the data from the fifo to the hdlc engines in 32-bit chunks. if the fifo detects that the fifo is below the low watermark, it then checks with the dma to see if there is any data available for that hdlc channel. the dma will know if any data is available because the host on the pci bus will have informed it of such via the pending-queue descriptor. when the dma detects that data is available, it informs the fifo and then the fifo decides which hdlc channel gets the highest priority to the dma to transfer data from the pci bus into the fifo. again, since the DS31256 can handle multiple hdlc channels, it is qu ite possible that at any one time, several hdlc channels will need the dma to burst data from the pci bus into the fifo. the fifo determines which hdlc channel the dma will handle next via a host configurable algorithm, which allows the selection to be either round robin or prio rity, decoded (with hdlc channe l 1 generally getting the highest priority). when the dma begins burst writing data into the fi fo, it will try to completely fill the fifo with hdlc packet data even if it that means writing multiple packets. once the fifo detects that the dma has filled it to beyond the low watermark (or an eof is reached), the fifo will begin transferring 32-bit dwords to the hdlc engine. one of the unique attributes of the DS31256 is the structure of the dma. the dma has been optimized to maintain maximum flexibility yet reduce the number of bus cycles required to transfer packet data. the dma uses a flexible scatter/gather technique, whic h allows that packet data to be place anywhere within the 32-bit address space. the user has the opti on on the receive side of two different buffer sizes
DS31256 256-channel, high-thro ughput hdlc controller 9 of 182 which are called ?large? and ?small? but that can be set to any size up to 8188 bytes. the user has the option to store the incoming data either, only in the large buffers, only in the small buffers, or fill a small buffer first and then fill large buffers as needed. the varying buffer storage options allow the user to make the best use of the available memory and to be able to balance the tradeoff between latency and bus utilization. the dma uses a set of descriptors to know where to store the incoming hdlc packet data and where to obtain hdlc packet data that is ready to be transmitted. the descriptors are fixed size messages that are handed back and forth from the dma to the host. since this descriptor transfer utilizes bus cycles, the dma has been structured to minimize the number of transfers required. for example on the receive side, the dma obtains descriptors from the host to know where in the 32-bit address space to place the incoming packet data. these descriptors are known as free-queue descriptors. when the dma reads these descriptors off of the pci bus, they contain all the information that the dma needs to know where to store the incoming data. unlike other existin g scatter/gather dma ar chitectures, the DS31256 dma does not need to use any more bus cycles to determin e where to place the data. other dma architectures tend to use pointers, which require them to go back onto the bus to obtain more information and hence use more bus cycles. another technique that the dma uses to maximize bus utilization is the ability to burst read and write the descriptors. the device can be enabled to read and write the descriptors in burst s of 8 or 16 instead of one at a time. since there is fixed overhead associated with each bus transaction, the ability to burst read and write descriptors allows the device to share the bus overhead among 8 or 16 descri ptor transactions which reduces the total number of bus cycles needed. the dma can also burst up to 256 dwords (1024 bytes) onto the pci bus. this helps to minimize bus cycles by allowing the device to burst large amounts of data in a smaller number of bus transactions that reduces bus cycles by reducing the amount of fixed overhead that is placed on the bus. the local bus block has two modes of operation. it can be used as either a bridge from the pci bus in which case it is a bus master or it can be used as a configuration bus in which case it is a bus slave. the bridge mode allows the host on the pci bus to access the local bus. the DS31256 maps data from the pci bus to the local bus. in the configuration mode, th e local bus is used only to control and monitor the DS31256 while the hdlc packet data will still be transferred to the host through the pci bus.
DS31256 256-channel, high-thro ughput hdlc controller 10 of 182 figure 2-1. block diagram rc2 rd2 rs2 tc2 td2 ts2 jtdo pclk pad[31:0] p rst p cbe[3:0] ppar p frame p irdy p trdy p stop pidsel p devsel p req p gnt p perr p serr rc15 rd15 rs15 tc15 td15 ts15 rc0 rd0 rs0 tc0 td0 ts0 rc1 rd1 rs1 tc1 td1 ts1 p xas p xds p x blast j trst jtdi jtms jtclk la[19:0] ld[15:0] l wr (lr/ w ) l rd ( l ds ) lim l int l rdy lms l cs lhold ( l br ) lhlda ( l bg ) lbgack lclk pin names in ( ) are active when the device is in the mot mode (i.e., lim = 1) l bhe jtag test access (sec. 12) local bus block (sec. 11) layer one block (sec. 6) hdlc block (sec. 7) fifo block (sec. 8) dma block (sec. 9) pci block (sec. 10) bert ( sec . 6.5) receive direction transmit direction dallas semiconductor DS31256
DS31256 256-channel, high-thro ughput hdlc controller 11 of 182 restrictions in creating the overall system architecture, the us er must balance the port, throughput, and hdlc channel restrictions of the DS31256. table 2-a lists all of the upper-bound maximum restrictions. table 2-a. restrictions item restriction port maximum of 16 channelized and unchannelized physical ports unchannelized ports 0 to 2: maximum data rate of 52mbps ports 3 to 15: maximum data rate of 10mbps channelized channelized and with byte interleave interfaces: 60 t1/64 e1 links maximum receive: 132mbps throughput maximum transmit: 132mbps hdlc maximum of 256 channels: if the fast hdlc engine on port 0 is being used, then it must be hdlc channel 1* if the fast hdlc engine on port 1 is being used, then it must be hdlc channel 2* if the fast hdlc engine on port 2 is being used, then it must be hdlc channel 3* *the 256 hdlc channels within the device are numbered 1 to 256. internal device configuration registers all internal device configuration registers (with the exception of the pci configuration registers, which are 32-bit registers) are 16 bits wide and are not by te addressable. when the host on the pci bus accesses these registers, the particular combination of byte enables (i.e., pcbe signals) is not important, but at least one of the byte enables must be asserted for a transaction to occur. all registers are read/write, unless otherwise noted. not assigned (n/a) bits shoul d be set to 0 when written to allow for future upgrades. these bits should be treated as having no meaning and could be either 0 or 1 when read. initialization on a system reset (which can be invoked by either hardware action through the prst signal or software action through the rst control bit in the master reset and id register), all of the internal device configuration registers are set to 0 (0000h). the local bus bridge mode control register (lbbmc) is not affected by a software-invoked system reset; it is for ced to all zeros only by a hardware reset. the internal registers that are accessed indirectly (these are listed as ?indirect registers? in the data sheet and consist of the channelized port registers in the layer 1 block, the dma configuration rams, the hdlc configuration registers, and the fifo registers) are not affected by a system reset, so they must be configured on power-up by the host to a proper state. table 2-b lists the steps required to initialize the DS31256. note: after device power-up and reset, it takes 0.625ms to get a port up and operating, therefore, the ports must wait a minimum of 0.625ms before packet data can be processed.
DS31256 256-channel, high-thro ughput hdlc controller 12 of 182 table 2-b. initialization steps initialization step comments 1) initialize the pci configuration registers achieved by asserting the pidsel signal. 2) initialize all indirect registers it is recommended that all of the indirect registers be set to 0000h ( table 2-c ). 3) configure the device for operation program all necessary registers, which include the layer 1, hdlc, fifo, and dma registers. 4) enable the hdlc channels done through the rchen and tchen bits in the r[n]cfg[j] and t[n]cfg[j] registers. 5) load the dma descriptors indicate to the dma where packet data can be written and where pending data (if any) resides. 6) enable the dmas done through the rde and tde control bits in the master configuration (mc) register. 7) enable dma for each hdlc channel done through the channel-enable bit in the receive and transmit configuration ram. 8) enable data transmission set tfda1 bit in tpncr registers. table 2-c. indirect registers register name number of indirect registers channelized port cp0rd to cp15rd 6144 (16 ports x 128 ds0 channels x 3 registers for each ds0 channel) receive hdlc channel definition rhcd 256 (one for each hdlc channel) transmit hdlc channel definition thcd 256 (one for each hdlc channel) receive dma configuration rdmac 1536 (one for each hdlc channel) transmit dma configuration tdmac 3072 (one for each hdlc channel) receive fifo staring block pointer rfsbp 256 (one for each hdlc channel) receive fifo block pointer rfbp 1024 (one for each fifo block) receive fifo high watermark rfhwm 256 (one for each hdlc channel) transmit fifo staring block pointer tfsbp 256 (one for each hdlc channel) transmit fifo block pointer tfbp 1024 (one for each fifo block) transmit fifo low watermark tflwm 256 (one for each hdlc channel)
DS31256 256-channel, high-thro ughput hdlc controller 13 of 182 3. signal description 3.1 overview/signal list this section describes the input and output sign als on the DS31256. signal names follow a convention that is shown in the signal naming convention table below. table 3-a lists all the signals, their signal type, description, and pin location. signal naming convention first letter signal category section r receive serial port 3.2 t transmit serial port 3.2 l local bus 3.3 j jtag test port 3.4 p pci bus 3.5 table 3-a. signal description pin name type function v19 jtclk i jtag ieee 1149.1 test serial clock u18 jtdi i jtag ieee 1149.1 test serial data input t17 jtdo o jtag ieee 1149.1 test serial data output w20 jtms i jtag ieee 1149.1 test mode select u19 jtrst i jtag ieee 1149.1 test reset g20 la0 i/o local bus address bit 0, lsb g19 la1 i/o local bus address bit 1 f20 la2 i/o local bus address bit 2 g18 la3 i/o local bus address bit 3 f19 la4 i/o local bus address bit 4 e20 la5 i/o local bus address bit 5 g17 la6 i/o local bus address bit 6 f18 la7 i/o local bus address bit 7 e19 la8 i/o local bus address bit 8 d20 la9 i/o local bus address bit 9 e18 la10 i/o local bus address bit 10 d19 la11 i/o local bus address bit 11 c20 la12 i/o local bus address bit 12 e17 la13 i/o local bus address bit 13 d18 la14 i/o local bus address bit 14 c19 la15 i/o local bus address bit 15 b20 la16 i/o local bus address bit 16 c18 la17 i/o local bus address bit 17 b19 la18 i/o local bus address bit 18 a20 la19 i/o local bus address bit 19, msb l20 lbgack o local bus grant acknowledge h20 lbhe o local bus byte high enable j20 lclk o local bus clock k19 lcs i local bus chip select v20 ld0 i/o local bus data bit 0, lsb u20 ld1 i/o local bus data bit 1 t18 ld2 i/o local bus data bit 2 t19 ld3 i/o local bus data bit 3
DS31256 256-channel, high-thro ughput hdlc controller 14 of 182 pin name type function t20 ld4 i/o local bus data bit 4 r18 ld5 i/o local bus data bit 5 p17 ld6 i/o local bus data bit 6 r19 ld7 i/o local bus data bit 7 r20 ld8 i/o local bus data bit 8 p18 ld9 i/o local bus data bit 9 p19 ld10 i/o local bus data bit 10 p20 ld11 i/o local bus data bit 11 n18 ld12 i/o local bus data bit 12 n19 ld13 i/o local bus data bit 13 n20 ld14 i/o local bus data bit 14 m17 ld15 i/o local bus data bit 15, msb l18 lhlda ( lbg ) i local bus hold acknowledge (local bus grant) l19 lhold ( lbr ) o local bus hold (local bus request) m18 lim i local bus intel/motorola bus select k20 lint i/o local bus interrupt m19 lms i local bus mode select h18 lrd ( lds ) i/o local bus read enable (local bus data strobe) k18 lrd y i local bus pci bridge ready h19 lwr (lr/ w ) i/o local bus write enable (local bus read/write select) a2, a8, a11, a19, b2, b18, j18, j19, k1?k3, l1?l3, m20, u14, w2, w9, y1, y19 n.c. ? no connect. do not connect any signal to this pin. v17 pad0 i/o pci multiplexed address and data bit 0 u16 pad1 i/o pci multiplexed address and data bit 1 y18 pad2 i/o pci multiplexed address and data bit 2 w17 pad3 i/o pci multiplexed address and data bit 3 v16 pad4 i/o pci multiplexed address and data bit 4 y17 pad5 i/o pci multiplexed address and data bit 5 w16 pad6 i/o pci multiplexed address and data bit 6 v15 pad7 i/o pci multiplexed address and data bit 7 w15 pad8 i/o pci multiplexed address and data bit 8 v14 pad9 i/o pci multiplexed address and data bit 9 y15 pad10 i/o pci multiplexed address and data bit 10 w14 pad11 i/o pci multiplexed address and data bit 11 y14 pad12 i/o pci multiplexed address and data bit 12 v13 pad13 i/o pci multiplexed address and data bit 13 w13 pad14 i/o pci multiplexed address and data bit 14 y13 pad15 i/o pci multiplexed address and data bit 15 v9 pad16 i/o pci multiplexed address and data bit 16 u9 pad17 i/o pci multiplexed address and data bit 17 y8 pad18 i/o pci multiplexed address and data bit 18 w8 pad19 i/o pci multiplexed address and data bit 19 v8 pad20 i/o pci multiplexed address and data bit 20 y7 pad21 i/o pci multiplexed address and data bit 21 w7 pad22 i/o pci multiplexed address and data bit 22 v7 pad23 i/o pci multiplexed address and data bit 23 u7 pad24 i/o pci multiplexed address and data bit 24 v6 pad25 i/o pci multiplexed address and data bit 25 y5 pad26 i/o pci multiplexed address and data bit 26
DS31256 256-channel, high-thro ughput hdlc controller 15 of 182 pin name type function w5 pad27 i/o pci multiplexed address and data bit 27 v5 pad28 i/o pci multiplexed address and data bit 28 y4 pad29 i/o pci multiplexed address and data bit 29 y3 pad30 i/o pci multiplexed address and data bit 30 u5 pad31 i/o pci multiplexed address and data bit 31 y16 pcbe0 i/o pci bus command/byte enable bit 0 v12 pcbe1 i/o pci bus command/byte enable bit 1 y9 pcbe2 i/o pci bus command/byte enable bit 2 w6 pcbe3 i/o pci bus command/byte enable bit 3 y2 pclk i pci and system clock. a 25mhz to 33mhz clock is applied here. y11 pdevsel i/o pci device select w10 pframe i/o pci cycle frame w4 pgnt i pci bus grant y6 pidsel i pci initialization device select w18 pint o pci interrupt v10 pirdy i/o pci initiator ready w12 ppar i/o pci bus parity v11 pperr i/o pci parity error v4 preq o pci bus request w3 prst i pci reset y12 pserr o pci system error w11 pstop i/o pci stop y10 ptrdy i/o pci target ready v18 pxas o pci extension signal: address strobe y20 pxblast o pci extension signal: burst last w19 pxds o pci extension signal: data strobe b1 rc0 i receive serial clock for port 0 d1 rc1 i receive serial clock for port 1 f2 rc2 i receive serial clock for port 2 h2 rc3 i receive serial clock for port 3 m1 rc4 i receive serial clock for port 4 p1 rc5 i receive serial clock for port 5 p4 rc6 i receive serial clock for port 6 v1 rc7 i receive serial clock for port 7 b17 rc8 i receive serial clock for port 8 b16 rc9 i receive serial clock for port 9 c14 rc10 i receive serial clock for port 10 d12 rc11 i receive seri al clock for port 11 a10 rc12 i receive serial clock for port 12 b8 rc13 i receive serial clock for port 13 b6 rc14 i receive serial clock for port 14 c5 rc15 i receive serial clock for port 15 d2 rd0 i receive serial data for port 0 e2 rd1 i receive serial data for port 1 g3 rd2 i receive serial data for port 2 j4 rd3 i receive serial data for port 3 m3 rd4 i receive serial data for port 4 r1 rd5 i receive serial data for port 5 t2 rd6 i receive serial data for port 6 u3 rd7 i receive serial data for port 7 d16 rd8 i receive serial data for port 8 c15 rd9 i receive serial data for port 9
DS31256 256-channel, high-thro ughput hdlc controller 16 of 182 pin name type function a14 rd10 i receive serial data for port 10 b12 rd11 i receive serial data for port 11 c10 rd12 i receive serial data for port 12 a7 rd13 i receive serial data for port 13 d7 rd14 i receive serial data for port 14 a3 rd15 i receive serial data for port 15 c2 rs0 i receive serial sync for port 0 e3 rs1 i receive serial sync for port 1 f1 rs2 i receive serial sync for port 2 h1 rs3 i receive serial sync for port 3 m2 rs4 i receive serial sync for port 4 p2 rs5 i receive serial sync for port 5 r3 rs6 i receive serial sync for port 6 t4 rs7 i receive serial sync for port 7 c17 rs8 i receive serial sync for port 8 a16 rs9 i receive serial sync for port 9 b14 rs10 i receive serial sync for port 10 c12 rs11 i receive serial sync for port 11 b10 rs12 i receive serial sync for port 12 c8 rs13 i receive serial sync for port 13 a5 rs14 i receive serial sync for port 14 b4 rs15 i receive serial sync for port 15 d3 tc0 i transmit serial clock for port 0 e1 tc1 i transmit serial clock for port 1 g2 tc2 i transmit serial clock for port 2 j3 tc3 i transmit serial clock for port 3 n1 tc4 i transmit serial clock for port 4 p3 tc5 i transmit serial clock for port 5 u1 tc6 i transmit serial clock for port 6 v2 tc7 i transmit serial clock for port 7 a18 tc8 i transmit serial clock for port 8 d14 tc9 i transmit serial clock for port 9 c13 tc10 i transmit serial clock for port 10 a12 tc11 i transmit serial clock for port 11 a9 tc12 i transmit serial clock for port 12 b7 tc13 i transmit serial clock for port 13 c6 tc14 i transmit serial clock for port 14 d5 tc15 i transmit serial clock for port 15 c1 td0 o transmit serial data for port 0 g4 td1 o transmit serial data for port 1 h3 td2 o transmit serial data for port 2 j1 td3 o transmit serial data for port 3 n3 td4 o transmit serial data for port 4 t1 td5 o transmit serial data for port 5 u2 td6 o transmit serial data for port 6 v3 td7 o transmit serial data for port 7 c16 td8 o transmit serial data for port 8 a15 td9 o transmit serial data for port 9 a13 td10 o transmit serial data for port 10 c11 td11 o transmit serial data for port 11 c9 td12 o transmit serial data for port 12 c7 td13 o transmit serial data for port 13
DS31256 256-channel, high-thro ughput hdlc controller 17 of 182 pin name type function a4 td14 o transmit serial data for port 14 b3 td15 o transmit serial data for port 15 c3 test i test. factory tests signal; leave open circuited e4 ts0 i transmit serial sync for port 0 f3 ts1 i transmit serial sync for port 1 g1 ts2 i transmit serial sync for port 2 j2 ts3 i transmit serial sync for port 3 n2 ts4 i transmit serial sync for port 4 r2 ts5 i transmit serial sync for port 5 t3 ts6 i transmit serial sync for port 6 w1 ts7 i transmit serial sync for port 7 a17 ts8 i transmit serial sync for port 8 b15 ts9 i transmit serial sync for port 9 b13 ts10 i transmit serial sync for port 10 b11 ts11 i transmit serial sync for port 11 b9 ts12 i transmit serial sync for port 12 a6 ts13 i transmit serial sync for port 13 b5 ts14 i transmit serial sync for port 14 c4 ts15 i transmit serial sync for port 15 d6, d10, d11, d15, f4, f17, k4, k17, l4, l17, r4, r17, u6, u10, u11, u15 v dd ? positive supply. 3.3v (10%) a1, d4, d8, d9, d13, d17, h4, h17, j17, m4, n4, n17, u4, u8, u12, u13, u17 v ss ? ground reference
DS31256 256-channel, high-thro ughput hdlc controller 18 of 182 3.2 serial port interface signal description signal name: rc0 to rc15 signal description: receive serial clock signal type: input data can be clocked into the device either on rising edges (normal clock mode) or falling edges (inverted clock mode) of rc. this is programmable on a per port basis. rc0?rc2 can operate at speeds up to 52mhz. rc3?rc15 can operate at speeds up to 10mhz. unused signals should be wired low. signal name: rd0 to rd15 signal description: receive serial data signal type: input can be sampled either on the rising edge of rc (norma l clock mode) or the falling edge of rc (inverted clock mode). unused signals should be wired low. signal name: rs0 to rs15 signal description: receive serial data synchronization pulse signal type: input this is a one-rc clock-wide synchronization pulse that can be applied to the DS31256 to force byte/frame alignment. the applied sync-signal pulse can be either active high (normal sync mode) or active low (inverted sync mode). the rs signal can be sampled either on the falling edge or on rising edge of rc ( table 3-b ). the applied sync pulse can be during the first rc clock period of a 193/256/512/1024-bit frame or it can be applied 1/2, 1, or 2 rc clocks early. this input sync signal resets a counter that rolls over at a count of either 193 (t1 mode) or 256 (e1 mode) or 512 (4.096mhz mode) or 1024 (8.192mhz mode) rc clocks. it is acceptable to pulse the rs signal once to establish byte boundaries and allow the envoy to track the byte/frame boundaries by counting rc clocks. if the incoming data does not require alignment to byte/frame boundaries, this signal should be wired low. table 3-b. rs sampled edge signal normal rc clock mode inverted rc clock mode 0 rc clock early mode falling edge rising edge 1/2 rc clock early mode rising edge falling edge 1 rc clock early mode falling edge rising edge 2 rc clock early mode falling edge rising edge signal name: tc0 to tc15 signal description: transmit serial clock signal type: input data can be clocked out of the device either on rising edges (normal clock mode) or falling edges (inverted clock mode) of tc. this is programmable on a per port basis. tc0 and tc1 can operate at speeds up to 52mhz. tc2? tc15 can operate at speeds up to 10mhz. unused signals should be wired low. signal name: td0 to td15 signal description: transmit serial data signal type: output this can be updated either on the rising edge of tc (normal clock mode) or the falling edge of tc (inverted clock mode). data can be forced high.
DS31256 256-channel, high-thro ughput hdlc controller 19 of 182 signal name: ts0 to ts15 signal description: transmit serial data synchronization pulse signal type: input this is a one-tc clock-wide synchronization pulse that can be applied to the envoy to force byte/frame alignment. the applied sync signal pulse can be either active high (normal sync mode) or active low (inverted sync mode). the ts signal can be sampled either on the falling edge or on rising edge of tc ( table 3-c ). the applied sync pulse can be during the first tc clock period of a 193/256/512/1024-bit frame or it can be applied 1/2, 1, or 2 tc clocks early. this input sync signal resets a counter that rolls over at a count of either 193 (t1 mode) or 256 (e1 mode) or 512 (4.096mhz mode) or 1024 (8.192mhz mode) tc cl ocks. it is acceptable to pulse the ts signal once to establish byte boundaries and allow the envoy to track the byte/frame boundaries by counting tc clocks. if the incoming data does not require alignment to byte/frame boundaries, this signal should be wired low. table 3-c. ts sampled edge signal normal tc clock mode inverted tc clock mode 0 tc clock early mode falling edge rising edge 1/2 tc clock early mode rising edge falling edge 1 tc clock early mode falling edge rising edge 2 tc clock early mode falling edge rising edge 3.3 local bus signal description signal name: lms signal description: local bus mode select signal type: input this signal should be connected low when the device opera tes with no local bus access or if the local bus is used as a bridge from the pci bus. this signal should be connected high if the local bus is to be used by an external host to configure the device. 0 = local bus is in the pci bridge mode (master) 1 = local bus is in the configuration mode (slave) signal name: lim signal description: local bus intel/motorola bus select signal type: input the signal determines whether the local bus operates in the intel mode (lim = 0) or the motorola mode (lim = 1). the signal names in parentheses are operational when the device is in the motorola mode. 0 = local bus is in the intel mode 1 = local bus is in the motorola mode signal name: ld0 to ld15 signal description: local bus nonmultiplexed data bus signal type: input/output (tri-state capable) in pci bridge mode (lms = 0), data from/to the pci bus can be transferred to/from these signals. when writing data to the local bus, these signals are outputs and updated on the rising edge of lclk. when reading data from the local bus, these signals are inputs, which are sampled on the rising edge of lclk. depending on the assertion of the pci byte enables (pcbe0 to pcbe3) and the local bus-width (lbw) control bit in the local bus bridge mode control register (lbbmc), this data bus uses all 16 bits (ld[15:0]) or just the lower 8 bits (ld[7:0]) or the upper 8 bits (ld[15:8]). if the upper ld bits (ld[15:8]) are used, then the local bus high-enable signal ( lbhe ) is asserted during the bus transaction. if the local bus is not currently involved in a bus transaction, all 16 signals are tri-stated. when reading data from the local bus, these si gnals are outputs that are updated on the rising edge of lclk. when writing data to the local bus, these signals become inputs, which are sampled on the rising edge of lclk. in configuration mode (lms = 1), the external host configures the device and obtains real-time status information about the device through these signals. only the 16-bit bus width is allowed (i.e., byte addressing is not available).
DS31256 256-channel, high-thro ughput hdlc controller 20 of 182 signal name: la0 to la19 signal description: local bus nonmultiplexed address bus signal type: input/output (tri-state capable) in the pci bridge mode (lms = 0), these signals are outputs that are asserted on the rising edge of lclk to indicate which address to be written to or read from. these signals are tri-stated when the local bus is not currently involved in a bus transaction and driven when a bus transaction is active. in configuration mode (lms = 1), these signals are inputs and only the bottom 16 (la[15:0]) are active. the upper four (la[19:16]) are ignored and should be connected low. these signals are sampled on the rising edge of lclk to determine the internal device configuration register that the external host wishes to access. signal name: lwr (lr/ w ) signal description: local bus write enable (local bus read/write select) signal type: input/output (tri-state capable) in the pci bridge mode (lms = 0), this output signal is asserted on the rising edge of lclk. in intel mode (lim = 0), it is asserted when data is to be written to the local bus. in motorola mode (lim = 1), this signal determines whether a read or write is to occur. if bus arbitration is enabled through the larbe control bit in the lbbmc register, this signal is tri-stated when the local bus is not currently involved in a bus transaction and driven when a bus transaction is active. when bus arbitr ation is disabled, this signal is always driven. in configuration mode (lms = 1), this signal is sampled on the rising edge of lclk. in intel mode (lim = 0), it determines when data is to be written to the device. in motorola mode (lim = 1), this signal determines whether a read or write is to occur. signal name: lrd ( lds ) signal description: local bus read enable (local bus data strobe) signal type: input/output (tri-state capable) in the pci bridge mode (lms = 0), this active-low output signal is asserted on the rising edge of lclk. in intel mode (lim = 0), it is asserted when data is to be read from the local bus. in motorola mode (lim = 1), the rising edge is used to write data into the slave device. if bus arbitration is enabled through the larbe control bit in the lbbmc register, this signal is tri-stated when the local bus is not currently involved in a bus transaction and driven when a bus transaction is active. when bus arbitr ation is disabled, this signal is always driven. in configuration mode (lms = 1), this signal is an active-lo w input that is sampled on the rising edge of lclk. in intel mode (lim = 0), it determines when data is to be read from the device. in motorola mode (lim = 1), the rising edge writes data into the device. signal name: lint signal description: local bus interrupt signal type: input/output (open drain) in the pci bridge mode (lms = 0), this active-low signal is an input that is sampled on the rising edge of lclk. if asserted and unmasked, this signal causes an interrupt at the pci bus through the pinta signal. if not used in pci bridge mode, this signal should be connected high. in configuration mode (lms = 1), this signal is an open- drain output that is forced low if one or more unmasked interrupt sources within the device is active. the signal remains low until either the interrupt is serviced or masked. signal name: lrdy signal description: local bus pci bridge ready (pci bridge mode only) signal type: input this active-low signal is sampled on the rising edge of lclk to determine when a bus transaction is complete. this signal is only examined when a bus transaction is taking place. this signal is ignored when the local bus is in configuration mode (lms = 1) and should be connected high.
DS31256 256-channel, high-thro ughput hdlc controller 21 of 182 signal name: lhlda ( lbg ) signal description: local bus hold acknowledge (local bus grant) (pci bridge mode only) signal type: input this input signal is sampled on the rising edge of lclk to determine when the device has been granted access to the bus. in intel mode (lim = 0), this is an active-high si gnal; in motorola mode (lim = 1) this is an active-low signal. this signal is ignored and should be connected high when the local bus is in configuration mode (lms = 1). also, in pci bridge mode (lms = 0), this signal should be wired deasserted when the local bus arbitration is disabled through the lbbmc register. signal name: lhold ( lbr ) signal description: local bus hold (local bus request) (pci bridge mode only) signal type: output this signal is asserted when the DS31256 is attempting to control the local bus. in intel mode (lim = 0), this signal is an active-high signal; in motorola mode (lim = 1) this signal is an active-low signal. it is deasserted concurrently with lbgack . this signal is tri-stated when the local bus is in configuration mode (lms = 1) and also in pci bridge mode (lms = 0) when the local bu s arbitration is disabled through the lbbmc register. signal name: lbgack signal description: local bus grant acknowledge (pci bridge mode only) signal type: output (tri-state capable) this active-low signal is asserted when the local bus hold-acknowledge/bus grant signal (lhlda/ lbg ) has been detected and continues its assertion for a programmable (32 to 1,048,576) number of lclks, based on the local bus arbitration timer setting in the lbbmc register. this signal is tri-stated when the local bus is in configuration mode (lms = 1). signal name: lbhe signal description: local bus byte-high enable (pci bridge mode only) signal type: output (tri-state capable) this active-low output signal is asserted when all 16 bits of the data bus (ld[15:0]) are active. it remains high if only the lower 8 bits (ld[7:0)] are active. if bus arbitr ation is enabled through the larbe control bit in the lbbmc register, this signal is tri-stated when the local bus is not currently involved in a bus transaction and driven when a bus transaction is active. when bus arbitration is disabled, this signal is always driven. this signal remains in tri-state when the local bus is not involved in a bus transaction and is in configuration mode (lms = 1). signal name: lclk signal description: local bus clock (pci bridge mode only) signal type: output (tri-state capable) this signal outputs a buffered version of the clock applie d at the pclk input. all local bus signals are generated and sampled from this clock. this output is tri-stated when the local bus is in configuration mode (lms = 1). it can be disabled in the pci bridge mode through the lbbmc register. signal name: lcs signal description: local bus chip select (configuration mode only) signal type: input this active-low signal must be asserted for the device to accept a read or write command from an external host. this signal is ignored in the pci bridge mode (lms = 0) and should be connected high.
DS31256 256-channel, high-thro ughput hdlc controller 22 of 182 3.4 jtag signal description signal name: jtclk signal description: jtag ieee 1149.1 test serial clock signal type: input this signal is used to shift data into jtdi on the rising edge and out of jtdo on the falling edge. if unused, this signal should be pulled high. signal name: jtdi signal description: jtag ieee 1149.1 test serial-data input signal type: input (with internal 10k  pullup) test instructions and data are clocked into this signal on the rising edge of jtclk. if unused, this signal should be pulled high. this signal has an internal pullup. signal name: jtdo signal description: jtag ieee 1149.1 test serial-data output signal type: output test instructions are clocked out of this signal on the falling edge of jtclk. if unused, this signal should be left open circuited. signal name: jtrst signal description: jtag ieee 1149.1 test reset signal type: input (with internal 10k  pullup) this signal is used to asynchronously reset the test access port controller. at power-up, jtrst must be set low and then high. this action sets the device into the boundary scan bypass mode, allowing normal device operation. if boundary scan is not used, this signal should be held low. this signal has an internal pullup. signal name: jtms signal description: jtag ieee 1149.1 test mode select signal type: input (with internal 10k  pullup) this signal is sampled on the rising edge of jtclk and is used to place the test port into the various defined ieee 1149.1 states. if unused, this signal should be pulled high. this signal has an internal pullup. 3.5 pci bus signal description signal name: pclk signal description: pci and system clock signal type: input (schmitt triggered) this clock input provides timing for the pci bus and the device?s internal logic. a 25mhz to 33mhz clock with a nominal 50% duty cycle should be applied here. signal name: prst signal description: pci reset signal type: input this active-low input is used to force an asynchronous rese t to both the pci bus and the device?s internal logic. when forced low, this input forces a ll the internal logic of the device into its default state, forces the pci outputs into tri-state, and forces the td[ 15:0] output port-data signals high. signal name: pad0 to pad31 signal description: pci address and data multiplexed bus signal type: input/output (tri-state capable) both address and data information are multiplexed onto these signals. each bus transaction consists of an address phase followed by one or more data phases. data can be either read or written in bursts. the address is transferred during the first clock cycle of a bus transaction. when the little endian format is selected, pad[31:24] is the msb of the dword; when big endian is selected, pad[7:0] contains the msb. when the device is an initiator,
DS31256 256-channel, high-thro ughput hdlc controller 23 of 182 these signals are always outputs during the address phase. they remain outputs for the data phase(s) in a write transaction and become inputs for a read transaction. when the device is a target, these signals are always inputs during the address phase. they remain inputs for the data phase(s) in a read transaction and become outputs for a write transaction. when the device is not involved in a bus transaction, these signals remain tri-stated. these signals are always updated and sampled on the rising edge of pclk. signal name: pcbe0/pcbe1/pcbe2/pcbe3 signal description: pci bus command and byte enable signal type: input/output (tri-state capable) bus command and byte enables are multiplexed onto the same pci signals. during an address phase, these signals define the bus command. during the data phase, these signals are used as byte enables. during data phases, pcbe0 refers to the pad[7:0] and pcbe3 refers to pad[31:24]. when this signal is high, the associated byte is invalid; when low, the associated byte is valid. when the device is an initiator, this signal is an output and is updated on the rising edge of pclk. when the device is a target, this signal is an input and is sampled on the rising edge of pclk. when the device is not involved in a bus transaction, these signals are tri-stated. signal name: ppar signal description: pci bus parity signal type: input/output (tri-state capable) this signal provides information on even parity across both the pad address/data bus and the pcbe bus command/byte enable bus. when the device is an initiator, th is signal is an output for writes and an input for reads. it is updated on the rising edge of pclk. when the device is a target, this signal is an input for writes and an output for reads. it is sampled on the rising edge of pclk. when the device is not involved in a bus transaction, ppar is tri-stated. signal name: pframe signal description: pci cycle frame signal type: input/output (tri-state capable) this active-low signal is created by the bus initiator and is used to indicate the beginning and duration of a bus transaction. pframe is asserted by the initiator during the first clock cycle of a bus transaction and remains asserted until the last data phase of a bus transaction. when th e device is an initiator, this signal is an output and is updated on the rising edge of pclk. when the device is a target, this signal is an input and is sampled on the rising edge of pclk. when the device is not involved in a bus transaction, pframe is tri-stated. signal name: pirdy signal description: pci initiator ready signal type: input/output (tri-state capable) the initiator creates this active-low signal to signal the target that it is ready to send/accept or to continue sending/accepting data. this signal handshakes with the ptrdy signal during a bus transaction to control the rate at which data transfers across the bus. during a bus transaction, pirdy is deasserted when the initiator cannot temporarily accept or send data, and a wait state is invoked. when the device is an initiator, this signal is an output and is updated on the rising edge of pclk. when the device is a target, this signal is an input and is sampled on the rising edge of pclk. when the device is not involved in a bus transaction, pirdy is tri-stated. signal name: ptrdy signal description: pci target ready signal type: input/output (tri-state capable) the target creates this active-low signal to signal the initiator that it is ready to send/accept or to continue sending/accepting data. this signal handshakes with the pirdy signal during a bus transaction to control the rate at which data transfers across the bus. during a bus transaction, ptrdy is deasserted when the target cannot temporarily accept or send data, and a wait state is invoked. when the device is a target, this signal is an output and is updated on the rising edge of pclk. when the device is an initiator, this signal is an input and is sampled on the rising edge of pclk. when the devi ce is not involved in a bus transaction, ptrdy is tri-stated.
DS31256 256-channel, high-thro ughput hdlc controller 24 of 182 signal name: pstop signal description: pci stop signal type: input/output (tri-state capable) the target creates this active-low signal to signal the in itiator to stop the current bus transaction. when the device is a target, this signal is an output and is updated on the risi ng edge of pclk. when the device is an initiator, this signal is an input and is sampled on the rising edge of pc lk. when the device is not involved in a bus transaction, pstop is tri-stated. signal name: pidsel signal description: pci initialization device select signal type: input this input signal is used as a chip select during configuration read and write transactions. this signal is disabled when the local bus is set in configuration mode (lms = 1). when pidsel is set high during the address phase of a bus transaction and the bus command signals (pcbe0 to pcbe3) indicate a register read or write, the device allows access to the pci configuration registers, and the pdevsel signal is asserted during the pclk cycle. pidsel is sampled on the rising edge of pclk. signal name: pdevsel signal description: pci device select signal type: input/output (tri-state capable) the target creates this active-low signal when it has decoded the address sent to it by the initiator as its own to indicate that the address is valid. if the device is an initiator and does not see this signal asserted within six pclk cycles, the bus transaction is aborted and the pci host is alerted. when the device is a target, this signal is an output and is updated on the rising edge of pclk. when the device is an initiator, this signal is an input and is sampled on the rising edge of pclk. when the device is not involved in a bus transaction, pdevsel is tri-stated. signal name: preq signal description: pci bus request signal type: output (tri-state capable) the initiator asserts this active-low signal to request that the pci bus arbiter allow it access to the bus. preq is updated on the rising edge of pclk. signal name: pgnt signal description: pci bus grant signal type: input the pci bus arbiter asserts this active-low signal to indi cate to the pci requesting agent that access to the pci bus has been granted. the device samples pgnt on the rising edge of pclk and, if detected, initiates a bus transaction when it has sensed that the pframe signal has been deasserted. signal name: pperr signal description: pci parity error signal type: input/output (tri-state capable) this active-low signal reports parity errors. pperr can be enabled and disabled through the pci configuration registers. this signal is updated on the rising edge of pclk. signal name: pserr signal description: pci system error signal type: output (open drain) this active-low signal reports any parity errors that occur during the address phase. pserr can be enabled and disabled through the pci configuration registers. th is signal is updated on the rising edge of pclk.
DS31256 256-channel, high-thro ughput hdlc controller 25 of 182 signal name: pinta signal description: pci interrupt signal type: output (open drain) this active-low (open drain) signal is asserted low asynchronously when the device is requesting attention from the device driver. pinta is deasserted when the device-interrupting source has been serviced or masked. this signal is updated on the rising edge of pclk. 3.6 pci extension signals these signals are not part of the normal pci bus signal set. there are additional signals that are asserted when the envoy is an initiator on the pci bus to help users interpret the normal pci bus signal set and connect them to a non-pci environment like an intel i960-type bus. signal name: pxas signal description: pci extension address strobe signal type: output this active-low signal is asserted low on the same clock edge as pframe and is deasserted after one clock period. this signal is only asserted when the device is an initiator. this signal is an output and is updated on the rising edge of pclk. signal name: pxds signal description: pci extension data strobe signal type: output this active-low signal is asserted when the pci bus either contains valid data to be read from the device or can accept valid data that is written into the device. this signal is only asserted when the device is an initiator. this signal is an output and is updated on the rising edge of pclk. signal name: pxblast signal description: pci extension burst last signal type: output this active-low signal is asserted on the same clock edge as pframe is deasserted and is deasserted on the same clock edge as pirdy is deasserted. this signal is only asserted when the device is an initiator. this signal is an output and is updated on the rising edge of pclk. 3.7 supply and test signal description signal name: test signal description: factory test input signal type: input (with internal 10k ? pullup) this input should be left open-circuited by the user. signal name: v dd signal description: positive supply signal type: n/a 3.3v (10%). all v dd signals should be connected together. signal name: v ss signal description: ground reference signal type: n/a all v ss signals should be connected to the local ground plane.
DS31256 256-channel, high-thro ughput hdlc controller 26 of 182 4. memory map 4.1 introduction all addresses within th e memory map are on dword boundaries, even though all internal device configuration registers are only one word (16 bits) wi de. the memory map consum es an address range of 4kb (12 bits). when the pci bus is the host (i.e., the local bus is in bridge mode), the actual 32-bit pci bus addresses of the internal device configuration re gisters are obtained by adding the dc base address value in the pci device-configuration memory-base address register (section 10.2 ) to the offset listed in sections 4.1 to 4.10 . when an external host is configuring the device through the local bus (i.e., the local bus is in the configuration mode), the offset is 0h and the host on the local bus uses the 16-bit addresses listed in sections 4.2 to 4.10 . table 4-a. memory map organization register pci host [offset from dc base] local bus host (16-bit address) section general configuration registers (0x000) (00xx) 4.2 receive port registers (0x1xx) (01xx) 4.3 transmit port registers (0x2xx) (02xx) 4.4 channelized port registers (0x3xx) (03xx) 4.6 hdlc registers (0x4xx) (04xx) 4.6 bert registers (0x5xx) (05xx) 4.7 receive dma registers (0x7xx) (07xx) 4.8 transmit dma registers (0x8xx) (08xx) 4.9 fifo registers (0x9xx) (09xx) 4.10 pci configuration registers fo r function 0 (pidsel) (0axx) 4.11 pci configuration registers for function 1 (pidsel) (0bxx) 4.12 4.2 general configuration registers (0xx) offset/ address name register section 0000 mrid master reset and id register 5.1 0010 mc master configuration 5.2 0020 sm master status register 5.3.2 0024 ism interrupt mask register for sm 5.3.2 0028 sdma status register for dma 5.3.2 002c isdma interrupt mask register for sdma 5.3.2 0030 sv54 status register for v.54 loopback detector 5.3.2 0034 isv54 interrupt mask register for sv.54 5.3.2 0040 lbbmc local bus bridge mode control register 11.2 0050 test test register 5.4
DS31256 256-channel, high-thro ughput hdlc controller 27 of 182 4.3 receive port registers (1xx) offset/ address name register section 0100 rp0cr receive port 0 control register 6.2 0104 rp1cr receive port 1 control register 6.2 0108 rp2cr receive port 2 control register 6.2 010c rp3cr receive port 3 control register 6.2 0110 rp4cr receive port 4 control register 6.2 0114 rp5cr receive port 5 control register 6.2 0118 rp6cr receive port 6 control register 6.2 011c rp7cr receive port 7 control register 6.2 0120 rp8cr receive port 8 control register 6.2 0124 rp9cr receive port 9 control register 6.2 0128 rp10cr receive port 10 control register 6.2 012c rp11cr receive port 11 control register 6.2 0130 rp12cr receive port 12 control register 6.2 0134 rp13cr receive port 13 control register 6.2 0138 rp14cr receive port 14 control register 6.2 013c rp15cr receive port 15 control register 6.2 4.4 transmit port registers (2xx) offset/ address name register section 0200 tp0cr transmit port 0 control register 6.2 0204 tp1cr transmit port 1 control register 6.2 0208 tp2cr transmit port 2 control register 6.2 020c tp3cr transmit port 3 control register 6.2 0210 tp4cr transmit port 4 control register 6.2 0214 tp5cr transmit port 5 control register 6.2 0218 tp6cr transmit port 6 control register 6.2 021c tp7cr transmit port 7 control register 6.2 0220 tp8cr transmit port 8 control register 6.2 0224 tp9cr transmit port 9 control register 6.2 0228 tp10cr transmit port 10 control register 6.2 022c tp11cr transmit port 11 control register 6.2 0230 tp12cr transmit port 12 control register 6.2 0234 tp13cr transmit port 13 control register 6.2 0238 tp14cr transmit port 14 control register 6.2 023c tp15cr transmit port 15 control register 6.2
DS31256 256-channel, high-thro ughput hdlc controller 28 of 182 4.5 channelized port registers (3xx) offset/ address name register section 0300 cp0rdis channelized port 0 re gister data indirect select 6.3 0304 cp0rd channelized port 0 register data 6.3 0308 cp1rdis channelized port 1 re gister data indirect select 6.3 030c cp1rd channelized port 1 register data 6.3 0310 cp2rdis channelized port 2 re gister data indirect select 6.3 0314 cp2rd channelized port 2 register data 6.3 0318 cp3rdis channelized port 3 re gister data indirect select 6.3 031c cp3rd channelized port 3 register data 6.3 0320 cp4rdis channelized port 4 re gister data indirect select 6.3 0324 cp4rd channelized port 4 register data 6.3 0328 cp5rdis channelized port 5 re gister data indirect select 6.3 032c cp5rd channelized port 5 register data 6.3 0330 cp6rdis channelized port 6 re gister data indirect select 6.3 0334 cp6rd channelized port 6 register data 6.3 0338 cp7rdis channelized port 7 re gister data indirect select 6.3 033c cp7rd channelized port 7 register data 6.3 0340 cp8rdis channelized port 8 re gister data indirect select 6.3 0344 cp8rd channelized port 8 register data 6.3 0348 cp9rdis channelized port 9 re gister data indirect select 6.3 034c cp9rd channelized port 9 register data. 6.3 0350 cp10rdis channelized port 10 re gister data indirect select. 6.3 0354 cp10rd channelized port 10 register data. 6.3 0358 cp11rdis channelized port 11 re gister data indirect select. 6.3 035c cp11rd channelized port 11 register data 6.3 0360 cp12rdis channelized port 12 re gister data indirect select 6.3 0364 cp12rd channelized port 12 register data 6.3 0368 cp13rdis channelized port 13 re gister data indirect select 6.3 036c cp13rd channelized port 13 register data 6.3 0370 cp14rdis channelized port 14 re gister data indirect select 6.3 0374 cp14rd channelized port 14 register data 6.3 0378 cp15rdis channelized port 15 re gister data indirect select 6.3 037c cp15rd channelized port 15 register data 6.3
DS31256 256-channel, high-thro ughput hdlc controller 29 of 182 4.6 hdlc registers (4xx) offset/ address name register section 0400 rhcdis receive hdlc channel definition indirect select 7.2 0404 rhcd receive hdlc channel definition 7.2 0410 rhpl receive hdlc maximum packet length. one per device. 7.2 0480 thcdis transmit hdlc channel definition indirect select 7.2 0484 thcd transmit hdlc channel definition 7.2 4.7 bert registers (5xx) offset/ address name register section 0500 bertc0 bert control 0 6.6 0504 bertc1 bert control 1 6.6 0508 bertrp0 bert repetitive pattern set 0 (lower word) 6.6 050c bertrp1 bert repetitive pattern set 1 (upper word) 6.6 0510 bertbc0 bert bit counter 0 (lower word) 6.6 0514 bertbc1 bert bit counter 1 (upper word) 6.6 0518 bertec0 bert error counter 0 (lower word) 6.6 051c bertec1 bert error counter 1 (upper word) 6.6 4.8 receive dma registers (7xx) offset/ address name register section 0700 rfqba0 receive free-queue base address 0 (lower word) 9.2.3 0704 rfqba1 receive free-queue base address 1 (upper word) 9.2.3 0708 rfqea receive free-queue end address 9.2.3 070c rfqsbsa receive free-queue small buffer start address 9.2.3 0710 rfqlbwp receive free-queue large buffer host write pointer 9.2.3 0714 rfqsbwp receive free-queue small buffer host write pointer 9.2.3 0718 rfqlbrp receive free-queue large buffer dma read pointer 9.2.3 071c rfqsbrp receive free-queue small buffer dma read pointer 9.2.3 0730 rdqba0 receive done-queue base address 0 (lower word) 9.2.4 0734 rdqba1 receive done-queue base address 1 (upper word) 9.2.4 0738 rdqea receive done-queue end address 9.2.4 073c rdqrp receive done-queue host read pointer 9.2.4 0740 rdqwp receive done-queue dma write pointer 9.2.4 0744 rdqfft receive done-queue fifo flush timer 9.2.4 0750 rdba0 receive descriptor base address 0 (lower word) 9.2.2 0754 rdba1 receive descriptor base address 1 (upper word) 9.2.2 0770 rdmacis receive dma config uration indirect select 9.3.5 0774 rdmac receive dma configuration 9.3.5 0780 rdmaq receive dma queues control 9.2.3/9.2.4 0790 rlbs receive large buffer size 9.2.1 0794 rsbs receive small buffer size 9.2.1
DS31256 256-channel, high-thro ughput hdlc controller 30 of 182 4.9 transmit dma registers (8xx) offset/ address name register section 0800 tpqba0 transmit pending-queue base address 0 (lower word) 9.3.3 0804 tpqba1 transmit pending-queue base address 1 (upper word) 9.3.3 0808 tpqea transmit pending-queue end address 9.3.3 080c tpqwp transmit pending-queue host write pointer 9.3.3 0810 tpqrp transmit pending-queue dma read pointer 9.3.3 0830 tdqba0 transmit done-queue base address 0 (lower word) 9.3.4 0834 tdqba1 transmit done-queue base address 1 (upper word) 9.3.4 0838 tdqea transmit done-queue end address 9.3.4 083c tdqrp transmit done-queue host read pointer 9.3.4 0840 tdqwp transmit done-queue dma write pointer 9.3.4 0844 tdqfft transmit done-queue fifo flush timer 9.3.4 0850 tdba0 transmit descriptor base address 0 (lower word) 9.3.2 0854 tdba1 transmit descriptor base address 1 (upper word) 9.3.2 0870 tdmacis transmit dma configuration indirect select 9.3.5 0874 tdmac transmit dma configuration 9.3.5 0880 tdmaq transmit dma queues control 9.3.3/9.3.4 4.10 fifo registers (9xx) offset/ address name register section 0900 rfsbpis receive fifo starting block pointer indirect select 8.2 0904 rfsbp receive fifo starting block pointer 8.2 0910 rfbpis receive fifo block pointer indirect select 8.2 0914 rfbp receive fifo block pointer 8.2 0920 rfhwmis receive fifo high-watermark indirect select 8.2 0924 rfhwm receive fifo high watermark 8.2 0980 tfsbpis transmit fifo starting block pointer indirect select 8.2 0984 tfsbp transmit fifo starting block pointer 8.2 0990 tfbpis transmit fifo block pointer indirect select 8.2 0994 tfbp transmit fifo block pointer 8.2 09a0 tflwmis transmit fifo low-watermark indirect select 8.2 09a4 tflwm transmit fifo low watermark 8.2
DS31256 256-channel, high-thro ughput hdlc controller 31 of 182 4.11 pci configuration registers for function 0 (pidsel/axx) offset/ address name register section 0x000/0a00 pvid0 pci vendor id/device id 0 10.2 0x004/0a04 pcmd0 pci command status 0 10.2 0x008/0a08 prcc0 pci revision id/class code 0 10.2 0x00c/0a0c plth0 pci cache line size/latency timer/header type 0 10.2 0x010/0a10 pdcm pci device configur ation memory base address 10.2 0x03c/0a3c pintl0 pci interrupt line and pin/min grant/max latency 0 10.2 4.12 pci configuration registers for function 1 (pidsel/bxx) offset/ address name register section 0x100/0b00 pvid1 pci vendor id/device id 1 10.2 0x104/0b04 pcmd1 pci command status 1 10.2 0x108/0b08 prcc1 pci revision id/class code 1 10.2 0x10c/0b0c plth1 pci cache line size/latency timer/header type 1 10.2 0x110/0b10 plbm pci device local base memory base address 10.2 0x13c/0b3c pintl1 pci interrupt line and pin/min grant/max latency 1 10.2
DS31256 256-channel, high-thro ughput hdlc controller 32 of 182 5. general device configuration and status/interrupt 5.1 master reset and id register description the master reset and id (mrid) register can be used to globally reset the device. when the rst bit is set to 1, all the internal registers (except the pci c onfiguration registers) are placed into their default state, which is 0000h. the host must set the rst bit b ack to 0 before the device can be programmed for normal operation. the rst bit does not force the pci out puts to tri-state as does the hardware reset, which is invoked by the prst pin. a reset invoked by the prst pin forces the rst bit to 0 as well as the rest of the internal config uration registers. see section 2 for more details a bout device initialization. the upper byte of the mrid register is read-only and it can be read by the host to determine the chip revision. contact the factory for sp ecifics on the meaning of the value read from the id0 to id7 bits. register name: mrid register description: master reset and id register register address: 0000h bit # 7 6 5 4 3 2 1 0 name n/a n/a n/a n/a n/a n/a n/a rst default 0 0 0 0 0 0 0 0 bit # 15 14 13 12 11 10 9 8 name id7 id6 id5 id4 id3 id2 id1 id0 default 0 0 0 0 0 0 0 0 note: bits that are underlined are read-only; all other bits are read-write. bit 0/master software reset (rst) 0 = normal operation 1 = force all internal registers (except lbbmc) to their default value of 0000h bits 8 to 15/chip revision id bit 0 to 7 (id0 to id7). read-only. contact the fact ory for details on the meaning of the id bits. 5.2 master configuration register description the master configuration (mc) register is used by the host to enable the receive and transmit dmas as well as to control their pci bus bursting attributes and select which port the bert is dedicated to. register name: mc register description: master configuration register register address: 0010h bit # 7 6 5 4 3 2 1 0 name bps0 pbo tdt1 tdt0 tde rdt1 dt0 rde default 0 0 0 0 0 0 0 0 bit # 15 14 13 12 11 10 9 8 name tfpc1 tfpc0 rfpc1 rfpc 0 bps4 bps3 bps2 bps1 default 0 0 0 0 0 0 0 0 note: bits that are underlined are read-only; all other bits are read-write.
DS31256 256-channel, high-thro ughput hdlc controller 33 of 182 bit 0/receive dma enable (rde). this bit is used to enable the receive dma. when it is set to 0, the receive dma does not pass any data from the receive fifo to the pci bus, even if one or more hdlc channels is enabled. on device initialization, the host should fully configure the receive dma before enabling it through this bit. 0 = receive dma is disabled 1 = receive dma is enabled bit 1/receive dma throttle select bit 0 (rdt0); bit 2/receive dma throttle select bit 1 (rdt1). these two bits select the maximum burst length that the receive dma is allowed on the pci bus. the dma can be restricted to a maximum burst length of just 32 dwords (128 bytes) or it can be incrementally adjusted up to 256 dwords (1024 bytes). the host selects the optimal length based on a number of factors, including the system environment for the pci bus, the number of hdlc channels being used, and the trade-off between channel latency and bus efficiency. 00 = burst length maximum is 32 dwords 01 = burst length maximum is 64 dwords 10 = burst length maximum is 128 dwords 11 = burst length maximum is 256 dwords bit 3/transmit dma enable (tde). this bit is used to enable the tr ansmit dma. when it is set to 0, the transmit dma does not pass any data from the pci bus to the transmit fifo, even if one or more hdlc channels is enabled. on device initialization, the host should fully configure the transmit dma before enabling it through this bit. 0 = transmit dma is disabled 1 = transmit dma is enabled bit 4/transmit dma throttle select bit 0 (tdt0); bit 5/transmit dma throttle select bit 1 (tdt1). these two bits select the maximum burst length the transmit dm a is allowed on the pci bus. the dma can be restricted to a maximum burst length of just 32 dwords (128 bytes) or it can be incrementally adjusted up to 256 dwords (1024 bytes). the host selects the optimal length based on a number of factors, including the system environment for the pci bus, the number of hdlc channels being use d, and the trade-off between channel latency and bus efficiency. 00 = burst length maximum is 32 dwords 01 = burst length maximum is 64 dwords 10 = burst length maximum is 128 dwords 11 = burst length maximum is 256 dwords bit 6/pci bus orientation (pbo). this bit selects whether hdlc packet data on the pci bus operates in either little endian or big endian format. little endian byte or dering places the least significant byte at the lowest address, while big endian places the least significant byte at the highest address. this bit setting only affects hdlc data on the pci bus. all other pci bus transactions to the internal device configuration registers, pci configuration registers, and local bus are always in little endian format. 0 = hdlc packet data on the pci bus is in little endian format 1 = hdlc packet data on the pci bus is in big endian format
DS31256 256-channel, high-thro ughput hdlc controller 34 of 182 bits 7 to 11/bert port select bits 0 to 4 (bps0 to bps4). these bits select which port has the dedicated resources of the bert. 00000 = port 0 01000 = port 8 10000 = port 0 (high speed) 11000 = n/a 00001 = port 1 01001 = port 9 10001 = port 1 (high speed) 11001 = n/a 00010 = port 2 01010 = port 10 10010 = port 2 (high speed) 11010 = n/a 00011 = port 3 01011 = port 11 10011 = n/a 11011 = n/a 00100 = port 4 01100 = port 12 10100 = n/a 11100 = n/a 00101 = port 5 01101 = port 13 10101 = n/a 11101 = n/a 00110 = port 6 01110 = port 14 10110 = n/a 11110 = n/a 00111 = port 7 01111 = port 15 10111 = n/a 11111 = n/a bit 12/receive fifo priority control bit 0 (rfpc0); bit 13/receive fifo priority control bit 1 (rfpc1). these bits select the algorithm the fifo uses to determ ine which hdlc channel gets the highest priority to the dma to transfer data from the fifo to the pci bus. in the priority decoded scheme, the lower the hdlc channel numbers, generally the higher the priority. in schemes ?10 and ?11, the upper priority decode channels have priority over the lower priority decode channels. 00 = all hdlc channels are serviced round robin 01 = hdlc channels 1 to 3 are priority decoded; other hdlc channels are round robin 10 = hdlc channels 16 to 1 are priority decoded; hdlc channels 17-up are round robin 11 = hdlc channels 64 to 1 are priority decoded; hdlc channels 65-up are round robin bit 14/transmit fifo priority control bit 0 (tfpc0 ); bit 15/transmit fifo priority control bit 1 (tfpc1). these two bits select the algorithm the fifo uses to determine which hdlc channel gets the highest priority to the dma to transfer data from the pci bus to the fifo. in the schemes ?01 and ?11m upper priority decode channels have priority over the lower priority decode channels. 00 = all hdlc channels are serviced round robin 01 = hdlc channels 1 to 3 are priority decoded; other hdlc channels are round robin 10 = hdlc channels 16 to 1 are priority decoded; other hdlc channels 17-up re round robin 11 = hdlc channels 64 to 1 are priority decoded; other hdlc channels 65-up are round robin 5.3 status and interrupt 5.3.1 general description of operation there are three status registers in the device: status master (sm), status for the receive v.54 loopback detector (sv54), and status for dma (sdma). these registers report events in real-time by setting a bit within the register to 1. all bits that have been set within the register are cleared when the register is read, and the bit is not set again until the event has occurred again. each bit can generate an interrupt at the pci bus through the pinta output signal pin, and, if the local bus is in the configuration mode, then an interrupt also be created at the lint output signal pin. each status regi ster has an associated interrupt mask register, which can allow/deny interrupts from being generated on a bit-by-bit basis. all status registers remain active even if the associated interrupt is disabled. sm register the status master (sm) register reports events that occur at the port interface, at the bert receiver, at the pci bus, and at the local bus. see figure 5-1 for details. the port interface reports change-of-frame alignment (cofa) events. if the software detects that one of these bits is set, the software must begin polling th e rp[n]cr or tp[n]cr registers of each active port (a maximum of 16 reads) to determine which port or ports has incurred a cofa. also, the host can allow/deny the cofa indications to be passed to the srcofa and stcofa status bits through the
DS31256 256-channel, high-thro ughput hdlc controller 35 of 182 interrupt enable for the receive cofa (ierc) a nd interrupt enable for the transmit cofa (ietc) control bits in the rp[n]cr and tp[n]cr registers, respectively. the bert receiver reports three events: a change in the receive synchronizer status, a bit error being detected, and if either the bit counter or the error c ounter overflows. each of these events can be masked within the bert function through the bert control register (bertc0). if the software detects that the bert has reported an event, the software must read the bert status register (bertec0) to determine which event(s) has occurred. the sm register also reports events as they occur in the pci bus and the local bus. there are no control bits to stop these events from being reported in the sm register. when the local bus is operated in the pci bridge mode, sm reports any interrupts detected through the local bus lint input signal pin and if any timing errors occur because the external timing signal lrdy . when the local bus is operated in the configuration mode, the lbint and lbe bits are meaningless and should be ignored. sv54 register the status for receive v.54 detector (sv54) register reports if the v.54 loopback detector has either timed out in its search for the v.54 loop-up pattern or if the detector has found and verified the loop- up/down pattern. there is a separate status bit (slbp) for each port. when set, the host must read the vto and vlb status bits in the rp[n]cr register of the corresponding port to fi nd the exact state of the v.54 detector. when the v.54 detector experiences a timeout in its search for the loop-up code (vto = 1), then the slbp status bit is continuously set until the v.54 detector is reset by the host, toggling the vrst bit in rp[n]cr register. there are no control bits to stop these events from being reported in the sv54 register. see figure 5-1 for details on the status bits and section 6 for details on the operation of the v.54 loopback detector. sdma register the status dma (sdma) register reports events pertaining to the receive and transmit dma blocks as well as the receive hdlc controller and fifo. the sdma reports when the dma reads from either the receive free queue or transmit pending queue or wr ites to the receive or tr ansmit done queues. also reported are error conditions that might occur in the access of one of these queues. the sdma reports if any of the hdlc channels experiences an fifo overflow/underflow condition and if the receive hdlc controller encounters a crc error, abort signal, or octet length problem on any of the hdlc channels. the host can determine which specific hdlc channel incurred an fifo overflow/underflow, crc error, octet length error, or abort by reading the status b its as reported in done queues, which are created by the dma. there are no control bits to stop these events from being reported in the sdma register.
DS31256 256-channel, high-thro ughput hdlc controller 36 of 182 figure 5-1. status register block diagram for sm and sv54 port i/f # 0 #1 #2 #3 #13 #14 #15 #1 #2 #3 #13 #14 #15 or or receive or sr cofa st cofa sbert pserr pperr n/a n/a lbint lbe rp0cr bit #14 rcofa port i/f # 0 transmit tp0cr bit #14 tcofa bertec0 bit 1 (beco) bertec0 bit 2 (bbco) bertc0 bit 13 (ieof) change in bertec0 bit 0 (sync) bertc0 bit 15 (iesync) bertec0 bit 3 (bed) bertc0 bit 14 (iebed) or bert int_bd slbp0 slbp1 slbp2 slbp3 slbp4 slbp5 slbp13 slbp15 slbp14 sm: status master register sv54: status for v54 detector port #15 change in v.54 detector (slbp) port #0 change in v.54 detector (slbp) port #1 change in v.54 detector (slbp) port #14 change in v.54 detector (slbp)
DS31256 256-channel, high-thro ughput hdlc controller 37 of 182 5.3.2 status and interrup t register description register name: sm register description: status master register register address: 0020h bit # 7 6 5 4 3 2 1 0 name n/a n/a n/a pperr pserr sbert stcofa srcofa default 0 0 0 0 0 0 0 0 bit # 15 14 13 12 11 10 9 8 name lbint lbe n/a n/a n/a n/a n/a n/a default 0 0 0 0 0 0 0 0 note: bits that are underlined are read-only; all other bits are read-write. bit 0/status bit for change-of-frame alignment (srcofa). this status bit is set to 1 if one or more of the receive ports has experienced a cofa event. the host must read the rcofa bit in the receive port control registers (rp[n]cr) of each active port to determine whic h port or ports has seen th e cofa. the srcofa bit is cleared when read and is not set again until the one or more receive ports has experienced another cofa. if enabled through the srcofa bit in the interrupt mask fo r sm (ism), the setting of this bit causes a hardware interrupt at the pci bus through the pinta signal pin and also at the lint if the local bus is in configuration mode. bit 1/status bit for transmit ch ange-of-frame alignment (stcofa). this status bit is set to 1 if one or more of the transmit ports has experienced a cofa event. the host must read the tcofa bit in the transmit port control registers (tp[n]cr) of each active port to determine which port or ports has seen the cofa. the stcofa bit is cleared when read and is not set again until one or more transmit ports has experienced another cofa. if enabled through the stcofa bit in the ism, the setting of this bit causes a hardware interrupt at the pci bus through the pinta signal pin and also at the lint if the local bus is in configuration mode. bit 2/status bit for change of state in bert (sbert). this status bit is set to 1 if there is a major change of state in the bert receiver. a major change of state is defined as either a change in the receive synchronization (i.e., the bert has gone into or out of receive synchronization), a bit error has been detected, or an overflow has occurred in either the bit counter or the error counter. th e host must read the status bits of the bert in the bert status register (bertec0) to determine the change of state. the sbert bit is cleared when read and is not set again until the bert has experienced another change of state. if enabled through the sbert bit in the ism, the setting of this bit causees a hardware interrupt at the pci bus through the pinta signal pin and also at the lint if the local bus is in configuration mode. bit 3/status bit for pci system error (pserr). this status bit is a software version of the pci bus hardware pin pserr. it is set to 1 if the pci bus detects an addres s parity error or other pci bus error. the pserr bit is cleared when read and is not set again until another pci bus error has occurred. if enabled through the pserr bit in the ism, the setting of this bit causes a hardware interrupt at the pci bus through the pinta signal pin and also at the lint if the local bus is in configuration mode. this status bit is also reported in the control/status register in the pci configuration registers (section 10 ). bit 4/status bit for pci system error (pperr). this status bit is a software version of the pci bus hardware pin pperr. it is set to 1 if the pci bus detects parity errors on the pad and pcbe buses as experienced or reported by a target. the pperr bit is cleared when read and is not set again until another parity error has been detected. if enabled through the pperr bit in the interrupt mask for sm (ism), the setting of this bit causes a hardware interrupt at the pci bus through the pinta signal pin and also at the lint if the local bus is in configuration mode. this status bit is also reported in the control/status register in the pci configuration registers (section 10 ).
DS31256 256-channel, high-thro ughput hdlc controller 38 of 182 bit 14/status bit for local bus error (lbe). this status bit applies to the local bus when it is operated in pci bridge mode. it is set to 1 when the local bus lrdy signal is not detected within nine lclk periods. this indicates to the host that an aborted local bus access has occurred. if enabled through the lbe bit in the interrupt mask for sm (ism), the setting of this bit cause s a hardware interrupt at the pci bus through the pinta signal pin and also at the lint if the local bus is in configuration mode. the lbe bit is meaningless when the local bus is operated in the configuration mode and should be ignored. bit 15/status bit for local bus interrupt (lbint). this status bit is set to 1 if the local bus lint signal has been detected as asserted. this status bit is only valid when the local bus is operated in pci bridge mode. the lbint bit is cleared when read and is not set again until the lint signal pin once again has been detected as asserted. if enabled through the lbint bit in the interrupt mask for sm (ism), the setting of this bit causes a hardware interrupt at the pci bus through the pinta signal pin. the lbint bit is meaningless when the local bus is operated in the configuration mode and should be ignored. register name: ism register description: interrupt mask register for sm register address: 0024h bit # 7 6 5 4 3 2 1 0 name n/a n/a n/a pperr pserr sbert stcofa srcofa default 0 0 0 0 0 0 0 0 bit # 15 14 13 12 11 10 9 8 name lbint lbe n/a n/a n/a n/a n/a n/a default 0 0 0 0 0 0 0 0 note: bits that are underlined are read-only; all other bits are read-write. bit 0/status bit for receive change-of-frame alignment (srcofa) 0 = interrupt masked 1 = interrupt unmasked bit 1/status bit for transmit change-of-frame alignment (stcofa) 0 = interrupt masked 1 = interrupt unmasked bit 2/status bit for change of state in bert (sbert) 0 = interrupt masked 1 = interrupt unmasked bit 3/status bit for pci system error (pserr) 0 = interrupt masked 1 = interrupt unmasked bit 4/status bit for pci system error (pperr) 0 = interrupt masked 1 = interrupt unmasked bit 14/status bit for local bus error (lbe) 0 = interrupt masked 1 = interrupt unmasked
DS31256 256-channel, high-thro ughput hdlc controller 39 of 182 bit 15/status bit for local bus interrupt (lbint) 0 = interrupt masked 1 = interrupt unmasked register name: sv54 register description: status register for the receive v.54 detector register address: 0030h bit # 7 6 5 4 3 2 1 0 name slbp7 slbp6 slbp5 slbp4 slbp3 slbp2 slbp1 slbp0 default 0 0 0 0 0 0 0 0 bit # 15 14 13 12 11 10 9 8 name slbp15 slbp14 slbp13 slbp12 slbp11 slbp10 slbp9 slbp8 default 0 0 0 0 0 0 0 0 note: bits that are underlined are read-only; all other bits are read-write. bits 0 to 15/status bits for change of state in receive v.54 loopback detector (slbp0 to slbp15). these status bits are set to 1 when the v.54 loopback detector w ithin the port has either timed out in its search for the loop-up pattern or it has detected and validated the loop-up or loop-down pattern. there is one status bit per port. the host must read the vto and vlb status bits in rp[n ]cr register of the corresponding port to determine the exact status of the v.54 detector. if the v.54 detector has timed out in its search for the loop-up code (vto = 1), then slbp is continuously set until the host resets the v.54 detector by toggling the vrst bit in rp[n]cr. if enabled through the slbp[n] bit in the interrupt mask for sv54 (isv54), the setting of these bits causes a hardware interrupt at the pci bus through the pinta signal pin and also at the lint if the local bus is in configuration mode. see section 6 for specific details about the operation of the v.54 loopback detector. register name: isv54 register description: interrupt mask register for sv54 register address: 0034h bit # 7 6 5 4 3 2 1 0 name slbp7 slbp6 slbp5 slbp4 slbp3 slbp2 slbp1 slbp0 default 0 0 0 0 0 0 0 0 bit # 15 14 13 12 11 10 9 8 name slbp15 slbp14 slbp13 slbp12 slbp11 slbp10 slbp9 slbp8 default 0 0 0 0 0 0 0 0 note: bits that are underlined are read-only; all other bits are read-write. bits 0 to 15/status bit for change of state in receive v.54 loopback detector (slbp0 to slbp15) 0 = interrupt masked 1 = interrupt unmasked
DS31256 256-channel, high-thro ughput hdlc controller 40 of 182 register name: sdma register description: status register for dma register address: 0028h bit # 7 6 5 4 3 2 1 0 name rlbre rlbr rovfl rlenc rabrt rcrce n/a n/a default 0 0 0 0 0 0 0 0 bit # 15 14 13 12 11 10 9 8 name tdqwe tdqw tpqr tudfl rdqwe rdqw rsbre rsbr default 0 0 0 0 0 0 0 0 note: bits that are underlined are read-only; all other bits are read-write. bit 2/status bit for receive hdlc crc error (rcrce). this status bit is set to 1 if any of the receive hdlc channels experiences a crc checksum error. the rcrce bit is cleared when read and is not set again until another crc checksum error has occurred. if enabled through the rcrce bit in the interrupt mask for sdma (isdma), the setting of this bit causes a hardware interrupt at the pci bus through the pinta signal pin and also at the lint if the local bus is in configuration mode. bit 3/status bit for receive hdlc abort detected (rabrt). this status bit is set to 1 if any of the receive hdlc channels detects an abort. the rabrt bit is cleared when read and is not set again until another abort has been detected. if enabled through the rabrt bit in the in terrupt mask for sdma (isdma), the setting of this bit causes a hardware interrupt at the pci bus through the pinta signal pin and also at the lint if the local bus is in configuration mode. bit 4/status bit for receive hdlc length check (rlenc) . this status bit is set to 1 if any of the hdlc channels:  exceeds the octet length count (if so enabled to check for octet length)  receives an hdlc packet that does not meet the minimum length criteria of either 4 or 6 bytes  experiences a nonintegral number of octets between opening and closing flags the rlenc bit is cleared when read and is not set again until another length violation has occurred. if enabled through the rlenc bit in the interrupt mask for sdma (isdma), the setting of this bit causes a hardware interrupt at the pci bus through the pinta signal pin and also at the lint if the local bus is in configuration mode. bit 5/status bit for receive fifo overflow (rovfl). this status bit is set to 1 if any of the hdlc channels experiences an overflow in the receive fifo. the rovfl bit is cleared when read and is not set again until another overflow has occurred. if enabled through the ro vfl bit in the interrupt mask for sdma (isdma), the setting of this bit causes a hardware interrupt at the pci bus through the pinta signal pin and also at the lint if the local bus is in configuration mode. bit 6/status bit for receive dma large buffer read (rlbr). this status bit is set to 1 each time the receive dma completes a single read or a burst read of the la rge buffer free queue. the rlbr bit is cleared when read and is not be set again until another read of the large buffer free queue has occurred. if enabled through the rlbr bit in the interrupt mask for sdma (isdma), the setting of this bit causes a hardware interrupt at the pci bus through the pinta signal pin and also at the lint if the local bus is in configuration mode. bit 7/status bit for receive dma large buffer read error (rlbre). this status bit is set to 1 each time the receive dma tries to read the large buffer free queue and it is empty. the rlbre bit is cleared when read and is not set again until another read of the large buffer free queue detects that it is empty. if enabled through the rlbre bit in the interrupt mask for sdma (isdma), the se tting of this bit causes a hardware interrupt at the pci bus through the pinta signal pin and also at the lint if the local bus is in configuration mode.
DS31256 256-channel, high-thro ughput hdlc controller 41 of 182 bit 8/status bit for receive dma small buffer read (rsbr) . this status bit is set to 1 each time the receive dma completes a single read or a burst read of the small buffer free queue. the rsbr bit is cleared when read and is not set again until another read of the small buffer free queue has occurred. if enabled through the rsbr bit in the interrupt mask for sdma (isdma), the setting of this bit causes a hardware interrupt at the pci bus through the pinta signal pin and also at the lint if the local bus is in configuration mode. bit 9/status bit for receive dma small buffer read error (rsbre). this status bit is set to 1 each time the receive dma tries to read the small buffer free queue and it is empty. the rsbre bit is cleared when read and is not set again until another read of the small buffer free queue detects that it is empty. if enabled through the rsbre bit in the interrupt mask for sdma (isdma), the setting of this bit causes a hardware interrupt at the pci bus through the pinta signal pin and also at the lint if the local bus is in configuration mode. bit 10/status bit for receive dma done-queue write (rdqw). this status bit is set to 1 when the receive dma writes to the done queue. based of the setting of the receive done-queue threshold setting (rdqt0 to rdqt2) bits in the receive dma queues-c ontrol (rdmaq) register, this bit is set either after each write or after a programmable number of writes from 2 to 128 (section 9.2.4 ). the rdqw bit is cleared when read and is not set again until another write to the done queue has occurred. if enabled through the rdqw bit in the interrupt mask for sdma (isdma), the setting of this bit causes a hardware interrupt at the pci bus through the pinta signal pin and also at the lint if the local bus is in configuration mode. bit 11/status bit for receive dma done-queue write error (rdqwe). this status bit is set to 1 each time the receive dma tries to write to the done queue and it is full. the rdqwe bit is cleared when read and is not set again until another write to the done queue detects that it is full. if enabled through the rdqwe bit in the interrupt mask for sdma (isdma), the setting of this bit causes a hardware interrupt at the pci bus through the pinta signal pin and also at the lint if the local bus is in configuration mode. bit 12/status bit for transmit fifo underflow (tudfl). this status bit is set to 1 if any of the hdlc channels experiences an underflow in the transmit fifo. the tudfl bit is cleared when read and is not set again until another underflow has occurred. if enabled through the tudfl bit in the interrupt mask for sdma (isdma), the setting of this bit causes a hardware interrupt at the pci bus through the pinta signal pin and also at the lint if the local bus is in configuration mode. bit 13/status bit for transmit dma pending-queue read (tpqr). this status bit is set to 1 each time the transmit dma reads the pending queue. the tpqr bit is cleared when read and is not set again until another read of the pending queue has occurred. if enabled through th e tpqr bit in the interrupt mask for sdma (isdma), the setting of this bit causes a hardware interrupt at the pci bus through the pinta signal pin and also at the lint if the local bus is in configuration mode. bit 14/status bit for transmit dma done-queue write (tdqw). this status bit is set to 1 when the transmit dma writes to the done queue. based on the setting of the transmit done-queue threshold setting (tdqt0 to tdqt2) bits in the transmit dma queues-control (tdmaq) register, this bit is set either after each write or after a programmable number of writes from 2 to 128 (section 9.2.4 ). the tdqw bit is cleared when read and is not set again until another write to the done queue has occurred. if enabled through the tdqw bit in the interrupt mask for sdma (isdma), the setting of this bit causes a hardware interrupt at the pci bus through the pinta signal pin and also at the lint if the local bus is in configuration mode. bit 15/status bit for transmit dma done-queue write error (tdqwe). this status bit is set to 1 each time the transmit dma tries to write to the done queue and it is full. the tdqwe bit is cleared when read and is not set again until another write to the done queue detects that it is full. if enabled through the tdqwe bit in the interrupt mask for sdma (isdma), the setting of this bit causes a hardware interrupt at the pci bus through the pinta signal pin and also at the lint if the local bus is in configuration mode.
DS31256 256-channel, high-thro ughput hdlc controller 42 of 182 register name: isdma register description: interrupt mask register for sdma register address: 002ch bit # 7 6 5 4 3 2 1 0 name rlbre rlbr rovfl rlenc rabrt rcrce n/a n/a default 0 0 0 0 0 0 0 0 bit # 15 14 13 12 11 10 9 8 name tdqwe tdqw tpqr tudfl rdqwe rdqw rsbre rsbr default 0 0 0 0 0 0 0 0 note: bits that are underlined are read-only; all other bits are read-write. bit 2/status bit for receive hdlc crc error (rcrce) 0 = interrupt masked 1 = interrupt unmasked bit 3/status bit for receive hdlc abort detected (rabrt) 0 = interrupt masked 1 = interrupt unmasked bit 4/status bit for receive hdlc length check (rlenc) 0 = interrupt masked 1 = interrupt unmasked bit 5/status bit for receive fifo overflow (rovfl) 0 = interrupt masked 1 = interrupt unmasked bit 6/status bit for receive dma large buffer read (rlbr) 0 = interrupt masked 1 = interrupt unmasked bit 7/status bit for receive dma large buffer read error (rlbre) 0 = interrupt masked 1 = interrupt unmasked bit 8/status bit for receive dma small buffer read (rsbr) 0 = interrupt masked 1 = interrupt unmasked bit 9/status bit for receive dma small buffer read error (rsbre) 0 = interrupt masked 1 = interrupt unmasked bit 10/status bit for receive dma done-queue write (rdqw) 0 = interrupt masked 1 = interrupt unmasked bit 11/status bit for receive dma done-queue write error (rdqwe) 0 = interrupt masked 1 = interrupt unmasked bit 12/status bit for transmit fifo underflow (tudfl) 0 = interrupt masked 1 = interrupt unmasked
DS31256 256-channel, high-thro ughput hdlc controller 43 of 182 bit 13/status bit for transmit dma pending-queue read (tpqr) 0 = interrupt masked 1 = interrupt unmasked bit 14/status bit for transmit dma done-queue write (tdqw) 0 = interrupt masked 1 = interrupt unmasked bit 15/status bit for transmit dma done-queue write error (tdqwe) 0 = interrupt masked 1 = interrupt unmasked 5.4 test register description register name: test register description: test register register address: 0050h bit # 7 6 5 4 3 2 1 0 name n/a n/a n/a n/a n/a n/a n/a ft default 0 0 0 0 0 0 0 0 bit # 15 14 13 12 11 10 9 8 name n/a n/a n/a n/a n/a n/a n/a n/a default 0 0 0 0 0 0 0 0 note: bits that are underlined are read-only; all other bits are read-write. bit 0/factory test (ft). this bit is used by the factory to place the DS31256 into the test mode. for normal device operation, this bit should be set to 0 whenever this register is written to. setting this bit places the rams into a low-power standby mode. bit 1 to 15/device internal test bits. bits 1 to 15 are for internal (dallas semiconductor) test use only, not user test-mode controls. values of these bits should always be 0. if any of these bits are set to 1 the device does not function properly.
DS31256 256-channel, high-thro ughput hdlc controller 44 of 182 6. layer 1 6.1 general description figure 6-1 shows the layer 1 block. each of the DS31256?s 16 layer 1 ports can be configured to support either a channelized application or an uncha nnelized application. users can mix the applications on the ports as needed. some or all of the ports can be channelized, while the othe rs can be configured as unchannelized. a channelized applica tion is defined as one that requi res an 8khz synchronization pulse to subdivide the serial data stream into a set of 8-bit ds0 channels (also ca lled time slots), which are time division multiplexed (tdm) one after another. ports running a ch annelized application require an 8khz pulse at the rs and ts signals. an unchanne lized application is defi ned as a synchronous clock and data interface. no synchronizati on pulse is required and the rs and ts signals are forced low in this application. section 17 contains examples of so me various configurations. in channelized applications, the layer 1 ports can be configured to operate in one of four modes, as shown in table 6-a . each port is capable of handling one, two, or four t1/e1 data streams. when more than one t1/e1 data stream is applied to the port, the individual t1/e1 data streams must be tdm into a single data stream at either a 4.096mhz or 8.192 mhz data rate. since the DS31256 can map any hdlc channel to any ds0 channel, it can support any form (byte interleaved, frame interleaved, etc.) of tdm that the application may require. on a ds0-by-ds0 basis, the DS31256 can be configured to process all 8 bits (64kbps), the seven most sign ificant bits (56kbps), or no data. table 6-a. channelized port modes mode function t1 (1.544mhz) n x 64kbps or n x 56kbps; where n = 1 to 24 (one t1 data stream) e1 (2.048mhz) n x 64kbps or n x 56kbps; where n = 1 to 32 (one t1 or e1 data stream) 4.096mhz n x 64kbps or n x 56kbps; where n = 1 to 64 (two t1 or e1 data streams) 8.192mhz n x 64kbps or n x 56kbps; where n = 1 to 128 (four t1 or e1 data streams) each port in the layer 1 block is connected to a slow hdlc engine. the slow hdlc engine can handle channelized applications at speeds up to 8.192mbps a nd unchannelized applications at speeds of up to 10mbps. ports 0 and 1 have the added capability of fast hdlc engines that can only handle unchannelized applications but at speeds of up to 52mhz. each port has an associated receive port control register (rp[n]cr, where n = 0 to 15) and a transmit port control register (tp[n]cr where n = 0 to 15). these control registers are defined in detail in section 6.2 . they control all the circuitry in the layer 1 block with the exception of the layer 1 state machine, which is shown in the center of the block diagram ( figure 6-1 ). each port contains a layer 1 state machine that connects directly to the slow hdlc engine. it prepares the raw incoming data for the slow hdlc engine and grooms the outgoing data. the layer 1 state machine performs a number of tasks that include the following:  assigning the hdlc channel number to the incoming and outgoing data  channelized local and network loopbacks  channelized selection of 64kbps, 56kbps, or no data  channelized transmits ds0 channel fill of all ones  routing data to and from the bert function  routing data to the v.54 loop pattern detector
DS31256 256-channel, high-thro ughput hdlc controller 45 of 182 the DS31256 has a set of three registers per ds0 cha nnel for each port that determine how each ds0 channel is configured. these three registers are defined in section 6.3 . if the fast (52mbps) hdlc engine is enabled on port 0, then hdlc channel 1 is assigned to it. likewise, hdlc channel 2 is assigned to the fast hdlc engine on port 1 if it is enabled, and hdlc channel 2 is assigned to the fast hdlc engine on port 2 if it is enabled. the DS31256 contains an on-board full-featured bert capable of generating and detecting both pseudorandom and repeating serial bit patterns. the bert function is a shared resource among the 16 ports on the DS31256 and can only be assigned to one por t at a time. it can be used in both channelized and unchannelized applicati ons and at speeds up to 52mhz. in channelized applications, data can be routed to and from any combination of ds0 channels that are being used on the port. the details on the bert function are covered in section 6.5 . the layer 1 block also contains a v.54 detector. each of the 16 ports contains a v.54 loop pattern detector on the receive side. the device can sear ch for the v.54 loop-up and loop-down patterns in both channelized and unchannelized app lications at speeds up to 10mhz. in channelized applications, the device can be configured to search for the patte rns in any combination of ds0 channels. section 6.4 describes all of the deta ils on the v.54 detector.
DS31256 256-channel, high-thro ughput hdlc controller 46 of 182 figure 6-1. layer 1 block diagram rs rc rd slow hdlc (one per port) fast hdlc layer 1 state machine receive transmit channel- ized local loop- back (cllb) channel- ized network loop- back (cnlb) v.54 detector port ram (see sec. 5.3) invert clock / data / sync local loop- back (llb) invert clock / data / sync force a ll ones tc td ts over- sample with pclk un- channel- ized network loopback (unlb) over- sample with pclk bert/ fast hdlc mux bert mux (figure 6-7) 1 of 16 llb unlb ports 0, 1, 2 only to / from fifo block l1_bd ports 0 & 1 onl y
DS31256 256-channel, high-thro ughput hdlc controller 47 of 182 figure 6-2. port timing (channelized and unchannelized applications) rc[n] / tc[n] normal mode rd[n] td[n] rs[n] / ts[n] 0 clock early & not inverted rs[n] / ts[n] 1/2 clock early & inverted rs[n] / ts[n] 1 clock early & not inverted rs[n] / ts[n] 2 clocks early & not inverted bit 0 bit 192 or 255 or 511 or 1023 bit 1 bit 191 or 254 or 510 or 1022 first bit of the frame last bit of the frame rc[n] / tc[n] inverted mode tdm_tim
DS31256 256-channel, high-thro ughput hdlc controller 48 of 182 6.2 port register descriptions receive-side control bits (one each for all 16 ports) register name: rp[n]cr, where n = 0 to 15 for each port register description: receive port [n] control register register address: see the register map in section 4 . bit # 7 6 5 4 3 2 1 0 name rss1 rss0 rsd1 rsd0 vrst rise ride rice default 0 0 0 0 0 0 0 0 bit # 15 14 13 12 11 10 9 8 name rcofa ierc vlb vto n/a llb ruen rp[i]hs default 0 0 0 0 0 0 0 0 note: bits that are underlined are read-only; all other bits are read-write. bit 0/invert clock enable (rice) 0 = do not invert clock (normal mode) 1 = invert clock (inverted clock mode) bit 1/invert data enable (ride) 0 = do not invert data (normal mode) 1 = invert data (inverted data mode) bit 2/invert sync enable (rise) 0 = do not invert sync pulse (normal mode) 1 = invert sync pulse (inverted sync pulse mode) bit 3/v.54 detector reset (vrst). toggling this bit from 0 to 1 and then back to 0 causes the internal v.54 detector to be reset and begin searching for the v.54 loop-up pattern. see section 6.4 for more details. bit 4/sync delay bit 0 (rsd0); bit 5/sync delay bit 1 (rsd1). these two bits define the format of the sync signal that is applied to the rs[n] input. these bits are ignored if th e port has been configured to operate in an unchannelized fashion (ruen = 1). 00 = sync pulse is 0 clocks early 01 = sync pulse is 1/2 clock early 10 = sync pulse is 1 clock early 11 = sync pulse is 2 clocks early bit 6/sync select bit 0 (rss0); bit 7/sync select bit 1 (rss1). these two bits select the mode in which each port is to be operated. each port can be configured to accept 24, 32, 64, or 128 ds0 channels at an 8khz rate. these bits are ignored if the port has been configured to operate in an unchannelized fashion (ruen = 1). 00 = t1 mode (24 ds0 channels and 193 rc clocks between rs sync signals) 01 = e1 mode (32 ds0 channels and 256 rc clocks between rs sync signals) 10 = 4.096mhz mode (64 ds0 channels and 512 rc clocks between rs sync signals) 11 = 8.192mhz mode (128 ds0 channels and 1024 rc clocks between rs sync signals)
DS31256 256-channel, high-thro ughput hdlc controller 49 of 182 bit 8/port 0 high-speed mode (rp0 (1, 2) hs). if enabled, the port 0 (1 or 2) layer 1 state machine logic is defeated, and rc0 (1, 2) and rd0 (1, 2) are routed to some dedicated high-speed hdlc processing logic. only present in rp0cr, rp1cr, and rp2cr. bit 8 is not assigned in ports 3 through 15. 0 = disabled 1 = enabled bit 9/unchannelized enable (ruen). when enabled, this bit forces the port to operate in an unchannelized fashion. when disabled, the port operates in a channelized mode. 0 = channelized mode 1 = unchannelized mode bit 10/local loopba ck enable (llb). this loopback routes transmit data back to the receive port. it can be used in both channelized and unchannelized port operating modes, even on ports 0, 1, and 2 operating at speeds up to 52mhz ( figure 6-1 ). in channelized applications, a per-channel loopback can be realized by using the channelized local loopback (cllb) function. see section 6.3 for details on cllb. 0 = loopback disabled 1 = loopback enabled bit 12/v.54 time out (vto). this read-only bit reports the real-time status of the v.54 detector. it is set to 1 when the v.54 detector has finished searching for the v .54 loop-up pattern and has not detected it. this indicates to the host that the v.54 detector can now be used to search for the v.54 loop-up pattern on other hdlc channels, and the host can initiate this by configuring the rv54 bits in the rp[n]cr register and then toggling the vrst control bit. see section 6.4 for more details about how the v.54 detector operates. bit 13/v.54 loopback (vlb). this read-only bit reports the real-time status of the v.54 detector. it is set to 1 when the v.54 detector has verified that a v.54 loop-up pattern has been seen. when set, it remains set until either the v.54 loop-down pattern is seen or the v.54 detector is reset by the host (i.e., by toggling vrst). see section 6.4 for more details on how the v.54 detector operates. bit 14/interrupt enable for rcofa (ierc) 0 = interrupt masked 1 = interrupt enabled bit 15/cofa status bit (rcofa). this latched read-only status bit sets if a cofa is detected. the cofa is detected by sensing that a sync pulse has occurred during a clock period that was not the first bit of the 193/256/512/1024-bit frame. this bit resets when read and does not set again until another cofa has occurred. transmit-side control bits (one each for all 16 ports) register name: tp[n]cr, where n = 0 to 15 for each port register description: transmit port [n] control register register address: see the register map in section 4 . bit # 7 6 5 4 3 2 1 0 name tss1 tss0 tsd1 tsd0 tfda1 tise tide tice default 0 0 0 0 0 0 0 0 bit # 15 14 13 12 11 10 9 8 name tcofa ietc n/a n/a tubs unlb tuen tp[i]hs default 0 0 0 0 0 0 0 0 note: bits that are underlined are read-only; all other bits are read-write.
DS31256 256-channel, high-thro ughput hdlc controller 50 of 182 bit 0/invert clock enable (tice) 0 = do not invert clock (normal mode) 1 = invert clock (inverted mode) bit 1/invert data enable (tide) 0 = do not invert data (normal mode) 1 = invert data (inverted mode) bit 2/invert sync enable (tise) 0 = do not invert sync (normal mode) 1 = invert sync pulse (inverted mode) bit 3/force data all ones ( tfda1 ) 0 = force all data at td to be 1 1 = allow data to be transmitted normally bit 4/sync delay bit 0 (tsd0); bit 5/sync delay bit 1 (tsd1). these bits define the format of the sync signal that is applied to the ts[n] input. these bits are ignored if the port has been configured to operate in an unchannelized fashion (tuen = 1). 00 = sync pulse is 0 clocks early 01 = sync pulse is 1/2 clock early 10 = sync pulse is 1 clock early 11 = sync pulse is 2 clocks early bit 6/sync select bit 0 (tss0); bit 7/sync select bit 1 (tss1). these bits select the mode in which each port operates. each port can be configured to accept 24, 32, 64, or 128 ds0 channels at an 8khz rate. these bits are ignored if the port has been configured to operate in an unchannelized fashion (tuen = 1). 00 = t1 mode (24 ds0 channels and 193 rc clocks between ts sync signals) 01 = e1 mode (32 ds0 channels and 256 rc clocks between ts sync signals) 10 = 4.096mhz mode (64 ds0 channels and 512 rc clocks between ts sync signals) 11 = 8.192mhz mode (128 ds0 channels and 1024 rc clocks between ts sync signals) bit 8/port 0 high-speed mode (tp0 (1, 2) hs). if enabled, the port 0 (1 or 2) layer 1 state machine logic is defeated and tc0 (1, 2) and td0 (1, 2) are routed to some dedicated high-speed hdlc processing logic. only present in tp0cr, tp1cr, and tp2cr. bit 8 is not assigned in ports 3 through 15. 0 = disabled 1 = enabled bit 9/unchannelized enable (tuen). when enabled, this bit forces the port to operate in an unchannelized fashion. when disabled, the port operates in a channelized mode. this bit overrides the transmit channel-enable (tchen) bit in the transmit layer 1 configuration (t[n ]cfg[j]) registers, which are described in section 6.3 . 0 = channelized mode 1 = unchannelized mode bit 10/unchannelized network loopback enable (unlb). see figure 6-1 for details. this loopback cannot be used for ports 0 and 1 when they are operating at speeds greater than 10mhz. 0 = loopback disabled 1 = loopback enabled bit 11/unchannelized bert select (tubs). this bit is ignored if tuen = 0. this bit overrides the transmit bert (tbert) bit in the transmit layer 1 configuration (t[n]cfg[j]) registers, which are described in section 6.3 . 0 = source transmit data from the hdlc controller 1 = source transmit data from the bert block
DS31256 256-channel, high-thro ughput hdlc controller 51 of 182 bit 14/interrupt enable for tcofa (ietc) 0 = interrupt masked 1 = interrupt enabled bit 15/cofa status bit (tcofa). this latched read-only status bit is set if a cofa is detected. a cofa is detected by sensing that a sync pulse has occurred during a clock period that was not the first bit of the 193/256/512/1024-bit frame. this bit is reset when read and is not set again until another cofa has occurred. 6.3 layer 1 configuration register description there are three configuration registers for each ds0 channel on each port ( figure 6-3 ). as shown in figure 6-1 , each of the 16 ports contains a port ram, which controls the layer 1 state machine. these 384 registers (three registers x 128 ds0 channels pe r port) comprise the port ram for each port, controlling and providing access to the layer 1 stat e machine. the registers are accessed indirectly through the channelized port register data (cp[n]rd) register. the host must first write to the channelized port register data-indirect select (cp[n]rdis) register to choose which ds0 channel and channelized port ram it wishes to configure or read. on power-up, the host must write to all the used r[n]cfg[j] and t[n]cfg[j] locations to make sure they are set into a known state. figure 6-3. layer 1 register set c[n]dat[j]: channelized ds0 data lsb rdata(8): receive ds0 data msb tdata(8): transmit ds0 data r[n]cfg[j]: receive configuration lsb rch#(8): receive hdlc channel number msb rchen rbert n/a rv54 n/a cllb n/a r56 t[n]cfg[j]: transmit configuration lsb tch#(8): transmit hdlc channel number msb tchen tbert n/a n/a cnlb n/a tfao t56
DS31256 256-channel, high-thro ughput hdlc controller 52 of 182 register name: cp[n]rdis, where n = 0 to 15 for each port register description: channelized port [n] register data indirect select register address: see the register map in section 4 . bit # 7 6 5 4 3 2 1 0 name n/a chid6 chid5 chid4 chid3 chid2 chid1 chid0 default 0 0 0 0 0 0 0 0 bit # 15 14 13 12 11 10 9 8 name iab iarw n/a n/a n/a n/a cprs1 cprs0 default 0 0 0 0 0 0 0 0 note: bits that are underlined are read-only; all other bits are read-write. bits 0 to 6/ds0 channel id (chid0 to chid6). the number of ds0 channels used depends on whether the port has been configured for an unchannelized application or for a channelized application. if set for a channelized application, the number of ds0 channels depends on whether the port has been configured in the t1, e1, 4.096mhz, or 8.192mhz mode. 0000000 (00h) = ds0 channel number 0 1111111 (7fh) = ds0 channel number 127 port mode ds0 channels available unchannelized (ruen/tuen = 1) 0 channelized t1 (ruen/tuen = 0 and rss0/tss0 = 0 and rss1/tss1 = 0) 0 to 23 channelized e1 (ruen/tuen = 0 and rss0/tss0 = 1 and rss1/tss1 = 0) 0 to 31 channelized 4.096mhz (ruen/tuen = 0 and rss0/tss0 = 0 and rss1/tss1 = 1) 0 to 63 channelized 8.192mhz (ruen/tuen = 0 and rss0/tss0 = 1 and rss1/tss1 = 1) 0 to 127 bit 8/channelized port ram select bit 0 (cprs0); bit 9/channelized port ram select bit 1 (cprs1) 00 = channelized ds0 data (c[n]dat[j]) 01 = receive configuration (r[n]cfg[j]) 10 = transmit configuration (t[n]cfg[j]) 11 = illegal selection bit 14/indirect access read/write (iarw). when the host wishes to read da ta from the internal channelized port ram, this bit should be written to 1 by the host. this causes the device to begin obtaining data from the ds0 channel location indicated by the chid bits and the data from the port ram indicated by the cprs0 and cprs1 bits. during the read access, the iab bit is set to 1. once the data is ready to be read from the cp[n]rd register, the iab bit is set to 0. when the host wishes to write data to the internal channelized port ram, the host should write this bit to 0. this causes the device to take the data that is currently present in the cp[n]rd register and write it to the port ram indicated by th e cprs0 and cprs1 bits and the ds0 channel indicated by the chid bits. when the device has completed the write, the iab is set to 0. bit 15/indirect access busy (iab). when an indirect read or write access is in progress, this read-only bit is set to 1. during a read operation, this bit is set to 1 until data is ready to be read. it is set to 0 when the data is ready to be read. during a write operation, this bit is set to 1 while the write is taking place. it is set to 0 once the write operation has completed.
DS31256 256-channel, high-thro ughput hdlc controller 53 of 182 register name: cp[n]rd, where n = 0 to 15 for each port register description: channelized port [n] register data register address: see the register map in section 4 . bit # 7 6 5 4 3 2 1 0 name chd7 chd6 chd5 chd4 chd3 chd2 chd1 chd0 default 0 0 0 0 0 0 0 0 bit # 15 14 13 12 11 10 9 8 name chd15 chd14 chd13 chd 12 chd11 chd10 chd9 chd8 default 0 0 0 0 0 0 0 0 note: bits that are underlined are read-only; all other bits are read-write. bits 0 to 15/ds0 channel data (chd0 to chd15). this is the 16-bit data that is to either be written into or read from the port ram, specified by the cp[n]rdis register. figure 6-4. port ram indirect access cp[n]rdis cp[n]rd port ram (one each for all 16 ports; n = 0 to 15) c[n]dat0 r[n]cfg0 t[n]cfg0 c[n]dat1 r[n]cfg1 t[n]cfg1 c[n]dat2 r[n]cfg2 t[n]cfg2 c[n]dat3 r[n]cfg3 t[n]cfg3 c[n]dat4 r[n]cfg4 t[n]cfg4 ... ... ... c[n]dat126 r[n]cfg126 t[n]cfg126 c[n]dat127 r[n]cfg127 t[n]cfg127 register name: c[n]dat[j], where n = 0 to 15 for each port and j = 0 to 127 for each ds0 register description: channelized layer 1 ds0 data register register address: indirect access through cp[n]rd bit # 7 6 5 4 3 2 1 0 name rdata(8): receive ds0 data default bit # 15 14 13 12 11 10 9 8 name tdata(8): transmit ds0 data default note: bits that are underlined are read-only; all other bits are read-write. note: in normal device operation, the host must never write to the c[n]dat[j] registers. bits 0 to 7/receive ds0 data (rdata). this register holds the most current ds0 byte received. it is used by the transmit-side layer 1 state machine when cha nnelized network loopback (cnlb) is enabled.
DS31256 256-channel, high-thro ughput hdlc controller 54 of 182 bits 8 to 15/transmit ds0 data (tdata). this register holds the most current ds0 byte transmitted. it is used by the receive-side layer 1 state machine when channelized local loopback (cllb) is enabled. register name: r[n]cfg[j] where n = 0 to 15 for each port and j = 0 to 127 for each ds0 register description: receive layer 1 configuration register register address: indirect access through cp[n]rd bit # 7 6 5 4 3 2 1 0 name rch#(8): receive hdlc channel number default bit # 15 14 13 12 11 10 9 8 name rchen rbert n/a rv54 n/a cllb n/a r56 default note: bits that are underlined are read-only; all other bits are read-write. bits 0 to 7/receive channel number (rch#). the cpu loads the number of the hdlc channels associated with this particular ds0 channel. if the port is running in an unchannelized mode (ruen = 1), the hdlc channel number only needs to be loaded into r[n]cfg0. if the fast (52mbps) hdlc engine is enabled on port 0, hdlc channel 1 is assigned to it and, likewise, hdlc channel 2 is assigned to the fast hdlc engine on port 2, if it is enabled. therefore, these hdlc channel numbers should not be used if the fast hdlc engines are enabled. 00000000 (00h) = hdlc channel number 1 (also used for the fast hdlc engine on port 0) 00000001 (01h) = hdlc channel number 2 (also used for the fast hdlc engine on port 1) 00000010 (02h) = hdlc channel number 3 (also used for the fast hdlc engine on port 2) 00000011 (03h) = hdlc channel number 4 11111111 (ffh) = hdlc channel number 256 bit 8/receive 56kbps (r56). if the port is running a channelized application, this bit determines whether the lsb of each ds0 should be processed or not. if this bit is set, the lsb of each ds0 channel is not routed to the hdlc controller (or the bert, if it has been enabled through the rbert bit). this bit does not affect the operation of the v.54 detector. it always searches on all 8 bits in the ds0. 0 = 64kbps (use all 8 bits in the ds0) 1 = 56kbps (use only the first 7 bits received in the ds0) bit 10/channelized local loopback enable (cllb). enabling this loopback forces the transmit data to replace the receive data. this bit must be set for each and every ds0 channel that is to be looped back. in order for the loopback to become active, the ds0 channel must be enab led (rchen = 1) and the ds0 channel must be set into the 64kbps mode (r56 = 0). 0 = loopback disabled 1 = loopback enabled bit 12/receive v.54 enable (rv54e). if this bit is cleared, this ds0 channel is not examined to check if the v.54 loop pattern is present. if set, the ds0 is examined for the v.54 loop pattern. when searching for the v.54 pattern within a ds0 channel, all 8 bits of the ds0 channel are examined, regardless of how the ds0 channel is configured (i.e., 64k or 56k). 0 = do not examine this ds0 channel for the v.54 loop pattern 1 = examine this ds0 channel for the v.54 loop pattern bit 14/route data into bert (rbert). setting this bit routes the ds0 data into the bert function. if the ds0 channel has been configured for 56kbps operation (r56 = 1), the lsb of each ds0 channel is not routed to the bert block. in order for the data to make it to the be rt block, the host must also configure the bert for the proper port through the master control register (section 5 ). 0 = do not route data to bert 1 = route data to bert
DS31256 256-channel, high-thro ughput hdlc controller 55 of 182 bit 15/receive ds0 channel enable (rchen). this bit must be set for each active ds0 channel in a channelized application. in a channelized application, al though a ds0 channel is deac tivated, the ch annel can still be set up to route data to the v.54 detector and/or the bert block. in addition, although a ds0 channel is active, the loopback function (cllb = 1) overrides this activation and routes transmit data back to the hdlc controller instead of the data coming in through the rd pin. in an unchannelized mode (ruen = 1), only the rchen bit in r[n]cfg0 needs to be configured. 0 = deactivated ds0 channel 1 = active ds0 channel register name: t[n]cfg[j], where n = 0 to 15 for each port and j = 0 to 127 for each ds0 register description: transmit layer 1 configuration register register address: indirect access through cp[n]rd bit # 7 6 5 4 3 2 1 0 name tch#(8): transmit hdlc channel number default bit # 15 14 13 12 11 10 9 8 name tchen tbert n/a n/a cnlb n/a tfao t56 default note: bits that are underlined are read-only; all other bits are read-write. bits 0 to 7/transmit channel number (tch#). the cpu loads the number of the hdlc channels associated with this particular ds0 channel. if the port is runn ing in an unchannelized mode (tuen = 1), the hdlc channel number only needs to be loaded into t[n]cfg0. if the fast (52mbps) hdlc engine is enabled on port 0, hdlc channel 1 is assigned to it and, likewise, hdlc channel 2 is assigned to the fast hdlc engine on port 2, if it is enabled. therefore, these hdlc channel numbers should not be used if the fast hdlc engines are enabled. 00000000 (00h) = hdlc channel number 1 (also used for the fast hdlc engine on port 0) 00000001 (01h) = hdlc channel number 2 (also used for the fast hdlc engine on port 1) 00000010 (02h) = hdlc channel number 3 (also used for the fast hdlc engine on port 2) 00000011 (03h) = hdlc channel number 4 11111111 (ffh) = hdlc channel number 256 bit 8/transmit 56kbps (t56). if the port is running a channelized application, this bit determines whether or not the lsb of each ds0 should be processed. if this bit is set, the lsb of each ds0 channel is not routed from the hdlc controller (or the bert, if it has been enabled thr ough the rbert bit), and the lsb bit position is forced to 1. 0 = 64kbps (use all 8 bits in the ds0) 1 = 56kbps (use only the first 7 bits transmitted in the ds0; force the lsb to 1) bit 9/transmit force all ones (tfao). if this bit is set, then eight 1s are placed into the ds0 channel for transmission instead of the data that is being sourced from the hdlc controller. if this bit is cleared, the data from the hdlc controller is transmitted. this bit is useful in instances when cllb is being activated to keep the looped back data from being sent out onto the network. this bit overrides tchen. 0 = transmit data from the hdlc controller 1 = force transmit data to all 1s bit 11/channelized network loopback enable (cnlb). enabling this loopback forces the receive data to replace the transmit data. this bit must be set for each and every ds0 channel that is to be looped back. this bit overrides tbert, tfao, and tchen. 0 = loopback disabled 1 = loopback enabled
DS31256 256-channel, high-thro ughput hdlc controller 56 of 182 bit 14/route data from bert (tbert). setting this bit routes ds0 data to the td pin from the bert block instead of from the hdlc controller. if the ds0 channel has been configured for 56kbps operation (t56 = 1), the lsb of each ds0 channel is not routed from the bert block but instead is forced to 1. in order for the data to make it from the bert block, the host must also configure the bert for the proper port through the master control register (section 5 ). this bit overrides tfao and tchen. 0 = do not route data from bert 1 = route data from bert (override the data from the hdlc controller) bit 15/transmit ds0 channel enable (tchen). this bit must be set for each active ds0 channel in a channelized application. in a channelized application, al though a ds0 channel is deac tivated, the ch annel can still be set up to route data from the bert block. in additi on, although a ds0 channel is active, the loopback function (cnlb = 1) overrides this activation and routes receive data to the td pin instead of from the hdlc. in an unchannelized mode (tuen = 1), only the tchen bit in t[n]cfg0 needs to be configured. 0 = deactivated ds0 channel 1 = active ds0 channel 6.4 receive v.54 detector each port within the device contains a v.54 loop pattern detector. v.54 is a pse udorandom pattern that is sent for at least 2 seconds, followed immediately by an all-ones pattern for at least 2 seconds if the channel is to be placed into loopback. the exact pattern and sequence is de fined in annex b of ansi t1.403-1995. when a port is configured for unchannelized opera tion (ruen = 1), all data entering the port through rd is routed to the v.54 detector. if the host wishes not to use the v.54 detector, the slbp status bits in the status v.54 (sv54) register should be ignored, and their corresponding interrupt mask bits in isv54 should be set to 0 to keep from disturbing the host. details about the status and interrupt bits can be found in section 5 . when the port is configured for channelized opera tion (ruen = 0), it is the host?s responsibility to determine which ds0 channels should be searched fo r the v.54 pattern. in cha nnelized applications, it may be that there are multiple hdlc channels the host wishes to look in for the v.54 pattern. if this is true, then the host performs the routine shown in table 6-b . a flow chart of the same routine is shown in figure 6-5 .
DS31256 256-channel, high-thro ughput hdlc controller 57 of 182 table 6-b. receive v.54 search routine step direction function 1 set up the channel search by configuring the rv54 bit in the r[n]cfg[j] register, the host determines in which ds0 channels the v.54 search is to take place. if this search sequence does not detect the v.54 pattern, the host can pick some new ds0 channels and try again. 2 toggle vrst once the ds0 channels have been set, the host toggles the vrst bit in the rp[n]cr register and begins monitoring the slbp status bit. 3 wait for slbp the slbp status bit reports any change of state in the v.54 search process. it can also generate a hardware interrupt (section 5 ). when slbp is set, the host knows that something significant has occurred and that it should read the vlb and vto real-time status bits in the rp[n]cr register. 4 read vto and vlb if vto = 1, the v.54 pattern did not appear in this set of channels and the host can reconfigure the search in other ds0 channels and move back to step #1. if vlb = 1, the v.54 loop-up pattern has been detected and the channel should be placed into loopback. a loopback can be invoked by the host by configuring the cnlb bit in the t[n]cfg[j] register for each ds0 channel that needs to be placed into loopback. move back to step #3. if vlb = 0, if the ds0 channels are already in loopback, the host monitors vlb to know when the loop-down pattern has been detected and when to take the channels out of loopback. the ds0 channels are taken out of loopback by again conf iguring the cnlb bits. move on to step #1.
DS31256 256-channel, high-thro ughput hdlc controller 58 of 182 figure 6-5. receive v.54 host algorithm set up the ds0 channel search toggle vrst wait for slbp = 1 vto = 1? place ds0 channels into loopback yes no wait for slbp = 1 take ds0 channels out of loopback v54host slbp is a status bit that is reported in the sv54 register (section 5.3) vrst is a control bit that is in the receive port control register (section 6.2) vto is a status bit that is in the receive port control register (section 6.2) slbp is a status bit that is reported in the sv54 register (section 5.3) ds0 channels can be configured to search for the v.54 loop pattern via the receive layer 1 configuration register (section 6.3) notes a lgorithm ds0 channels can be placed into loopback via the receive layer 1 configuration register (section 6.3) ds0 channels can be taken out of loopback via the receive layer 1 configuration register (section 6.3)
DS31256 256-channel, high-thro ughput hdlc controller 59 of 182 figure 6-6. receive v.54 state machine vrst = 1 vlb = 0 vto = 0 slbp = 0 search for loop up pattern for 32 vclks reset 4 second timer; wait for loss of sync or all 1s (64 in a row) or for the 4 second timer to expire search for loop down pattern vlb = 1 sync = 0 vlb = 0 sync = 1 vto = 1 sync = 0 sync = 0 or 4 second timer has expired sync = 1 all ones time out (vto) loopback (vlb); both in rp[n]cr v.54 state machine clk data vrst (in rp[n]cr) v54sm all ones sysclk sysclk is used only to time a 4 second timer. it is run into a 2e27 counter which provides a 4.03 second time out with a 33mhz clock and a 5.37 second time out with a 25mhz clock wait for loss of sync or all 1s (64 in a row) sync = 0 change of state in status (slbp); in sv54 slbp = 1 slbp = 1
DS31256 256-channel, high-thro ughput hdlc controller 60 of 182 6.5 bert the bert block is capable of generatin g and detecting the following patterns:  the pseudorandom patterns 2e7, 2e11, 2e15, and qrss  a repetitive pattern from 1 to 32 bits in length  alternating (16-bit) words that flip every 1 to 256 words the bert receiver has a 32-bit bit counter and a 24-bit error counter. it can generate interrupts upon detecting a bit error, a change in synchronization, or if an overflow occurs in the bit and error counters. see section 5 for details on status bits and interrupts fro m the bert block. to activate the bert block, the host must configure the bert mux ( figure 6-7 ). in channelized applications, the host must also configure the layer 1 state machine to send/obtain data to/from the bert block through the layer 1 configuration registers (section 6.3 ). figure 6-7. bert mux diagram port 0 (slow) port 1 (slow) port 2 (slow) port 3 (slow) port 4 (slow) port 5 (slow) bert mux bert block sbert status bit in sm internal control and configuration bus port 13 (slow) port 14 (slow) port 15 (slow) port 0 (fast) port 1 (fast) bert select (5) in the master configuration register port 2 (fast)
DS31256 256-channel, high-thro ughput hdlc controller 61 of 182 6.6 bert register description figure 6-8. bert register set bertc0: bert control 0 lsb n/a tinv rinv ps2 ps1 ps0 lc resync msb iesync iebed ieof n/a rpl3 rpl2 rpl1 rpl0 bertc1: bert control 1 lsb eib2 eib1 eib0 sbe n/a n/a n/a tc msb alternating word count bertrp0: bert repetitive pattern set 0 (lower word) lsb bert repetitive pattern set (lower byte) msb bert repetitive pattern set bertrp1: bert repetitive pattern set 1 (upper word) lsb bert repetitive pattern set msb bert repetitive pattern set (upper byte) bertbc0: bert bit counter 0 (lower word) lsb bert 32-bit bit counter (lower byte) msb bert 32-bit bit counter bertbc1: bert bit counter 0 (upper word) lsb bert 32-bit bit counter msb bert 32-bit bit counter (upper byte) bertec0: bert error counter 0/status lsb n/a ra1 ra0 rlos bed bbco beco sync msb bert 24-bit error counter (lower byte) bertec1: bert error counter 1 (upper word) lsb bert 24-bit error counter msb bert 24-bit error counter (upper byte)
DS31256 256-channel, high-thro ughput hdlc controller 62 of 182 register name: bertc0 register description: bert control register 0 register address: 0500h bit # 7 6 5 4 3 2 1 0 name n/a tinv rinv ps2 ps1 ps0 lc resync default 0 0 0 0 0 0 0 0 bit # 15 14 13 12 11 10 9 8 name iesync iebed ieof n/ a rpl3 rpl2 rpl1 rpl0 default 0 0 0 0 0 0 0 0 note: bits that are underlined are read-only; all other bits are read-write. bit 0/force resynchronization (resync). a low-to-high transition forces the receive bert synchronizer to resynchronize to the incoming data stream. this bit should be toggled from low to high whenever the host wishes to acquire synchronization on a new pattern. it must be cl eared and set again for a subsequent resynchronization. note: bits 2, 3, and 4 must be set, minimum of 64 system clock cycles, before toggling the resync bit (bit 0). bit 1/load bit and error counters (lc). a low-to-high transition latches the current bit and error counts into the host accessible registers bertbc and bertec and clears the internal count. this bit should be toggled from low to high whenever the host wishes to begin a new acquisition period. must be cleared and set again for subsequent loads. bit 2/pattern select bit 0 (ps0); bit 3/pattern select bit 1 (ps1); bit 4/pattern select bit 2 (ps2) 000 = pseudorandom pattern 2e7 - 1 001 = pseudorandom pattern 2e11 - 1 010 = pseudorandom pattern 2e15 - 1 011 = pseudorandom pattern qrss (2e20 - 1 with a 1 forced, if the next 14 positions are 0) 100 = repetitive pattern 101 = alternating word pattern 110 = illegal state 111 = illegal state bit 5/receive invert data enable (rinv) 0 = do not invert the incoming data stream 1 = invert the incoming data stream bit 6/transmit invert data enable (tinv) 0 = do not invert the outgoing data stream 1 = invert the outgoing data stream bit 8/repetitive pattern length bit 0 (rpl0); bit 9/repetitive pattern length bit 1 (rpl1); bit 10/repetitive pattern length bit 2 (rpl2); bit 11/repetitive pattern length bit 3 (rpl3). rpl0 is the lsb and rpl3 is the msb of a nibble that describes the how long the repetitive pattern is. the valid range is 17 (0000) to 32 (1111). these bits are ignored if the receive bert is programmed for a pseudorandom pattern. to create repetitive patterns less than 17 bits in length, the user must set the length to an integer number of the desired length that is less than or equal to 32. for example, to create a 6-bit pattern, the user can set the length to 18 (0001) or 24 (0111) or 30 (1101).
DS31256 256-channel, high-thro ughput hdlc controller 63 of 182 repetitive patte rn length map length code length code length code length code 17 bits 0000 18 bits 0001 19 bits 0010 20 bits 0011 21 bits 0100 22 bits 0101 23 bits 0110 24 bits 0111 25 bits 1000 26 bits 1001 27 bits 1010 28 bits 1011 29 bits 1100 30 bits 1101 31 bits 1101 32 bits 1111 bit 13/interrupt enable for counter overflow (ieof). allows the receive bert to cause an interrupt if either the bit counter or the error counter overflows. 0 = interrupt masked 1 = interrupt enabled bit 14/interrupt enable for bit error detected (iebed). allows the receive bert to cause an interrupt if a bit error is detected. 0 = interrupt masked 1 = interrupt enabled bit 15/interrupt enable for change-o f-synchronization status (iesync). allows the receive bert to cause an interrupt if there is a change of state in the synchronization status (i.e., the receive bert either goes into or out of synchronization). 0 = interrupt masked 1 = interrupt enabled register name: bertc1 register description: bert control register 1 register address: 0504h bit # 7 6 5 4 3 2 1 0 name eib2 eib1 eib0 sbe n/a n/a n/a tc default 0 0 0 0 0 0 0 0 bit # 15 14 13 12 11 10 9 8 name alternating word count default 0 0 0 0 0 0 0 0 note: bits that are underlined are read-only; all other bits are read-write. bit 0/transmit pattern load (tc). a low-to-high transition loads the pattern generator with repetitive or pseudorandom pattern that is to be generated. this bit should be toggled from low to high whenever the host wishes to load a new pattern. must be cleared and set again for subsequent loads. bit 4/single bit-error insert (sbe). a low-to-high transition creates a single bit error. must be cleared and set again for a subsequent bit error to be inserted. bit 5/error insert bit 0 (eib0); bit 6/error insert bit 1 (eib1); bit 7/error insert bit 2 (eib2). automatically inserts bit errors at the prescribed rate in to the generated data pattern. useful for verifying error detection operation.
DS31256 256-channel, high-thro ughput hdlc controller 64 of 182 eib2 eib1 eib0 error rate inserted 0 0 0 no errors automatically inserted 0 0 1 10e-1 0 1 0 10e-2 0 1 1 10e-3 1 0 0 10e-4 1 0 1 10e-5 1 1 0 10e-6 1 1 1 10e-7 bits 8 to 15/alternating word count rate. when the bert is programmed in the alternating word mode, the words repeat for the count loaded into this register, then flip to the other word and again repeat for the number of times loaded into this register. the valid count range is from 05h to ffh. register name: bertbrp0 register description: bert repetitive pattern set 0 register address: 0508h register name: bertbrp1 register description: bert repetitive pattern set 1 register address: 050ch bertrp0: bert repetitive pattern set 0 (lower word) bit # 7 6 5 4 3 2 1 0 name bert repetitive pattern set (lower byte) default 0 0 0 0 0 0 0 0 bit # 15 14 13 12 11 10 9 8 name bert repetitive pattern set default 0 0 0 0 0 0 0 0 bertrp1: bert repetitive pattern set 1 (upper word) bit # 23 22 21 20 19 18 17 16 name bert repetitive pattern set default 0 0 0 0 0 0 0 0 bit # 31 30 29 28 27 26 25 24 name bert repetitive pattern set (upper byte) default 0 0 0 0 0 0 0 0 note: bits that are underlined are read-only; all other bits are read-write. bits 0 to 31/bert repetitive pattern set (bertrp0 and bertrp1). these registers must be properly loaded for the bert to properly generate and synchronize to either a repetitive pattern, a pseudorandom pattern, or an alternating word pattern. for a repetitive pattern that is le ss than 32 bits, the pattern should be repeated so that all 32 bits are used to describe the pattern. for example, if the pattern was the repeating 5-bit pattern ?01101? (where the right-most bit is sent first and received fi rst), then pbrp0 should be loaded with xb5ad and pbrp1 should be loaded with x5ad6. for a pseudorandom pattern, bo th registers should be loaded with all ones (i.e., xffff). for an alternating word pattern, one word should be placed into pbrp0 and the other word should be placed into pbrp1. for example, if the dds stress pattern ?7e? is to be described, the user would place x0000 in pbrp0 and x7e7e in pbrp1 and the alternating word counter would be set to 50 (decimal) to allow 100 bytes of 00h followed by 100 bytes of 7eh to be sent and received.
DS31256 256-channel, high-thro ughput hdlc controller 65 of 182 register name: bertbc0 register description: bert 32-bit bit counter (lower word) register address: 0510h register name: bertbc1 register description: bert 32-bit bit counter (upper word) register address: 0514h bertbc0: bert bit counter 0 (lower word) bit # 7 6 5 4 3 2 1 0 name bert 32-bit bit counter (lower byte) default 0 0 0 0 0 0 0 0 bit # 15 14 13 12 11 10 9 8 name bert 32-bit bit counter default 0 0 0 0 0 0 0 0 bertbc1: bert bit counter 0 (upper word) bit # 23 22 21 20 19 18 17 16 name bert 32-bit bit counter default 0 0 0 0 0 0 0 0 bit # 31 30 29 28 27 26 25 24 name bert 32-bit bit counter (upper byte) default 0 0 0 0 0 0 0 0 note: bits that are underlined are read-only; all other bits are read-write . bits 0 to 31/bert 32-bit bit co unter (bertbc0 and bertbc1). this 32-bit counter increments for each data bit (i.e., clock) received. this counter is not disabled when the receive bert loses synchronization. this counter is loaded with the current bit count value when th e lc control bit in the bertc0 register is toggled from low (0) to high (1). when full, this counter saturates and sets the bbco status bit. register name: bertec0 register description: bert 24-bit error counter (lower) and status information register address: 0518h bit # 7 6 5 4 3 2 1 0 name n/a ra1 ra0 rlos bed bbco beco sync default 0 0 0 0 0 0 0 0 bit # 15 14 13 12 11 10 9 8 name bert 24-bit error counter (lower byte) default 0 0 0 0 0 0 0 0 note: bits that are underlined are read-only; all other bits are read-write. bit 0/real-time synchronization status (sync). real-time status of the synchronizer (this bit is not latched). is set when the incoming pattern matches for 32 consecutive bit positions. is cleared when six or more bits out of 64 are received in error.
DS31256 256-channel, high-thro ughput hdlc controller 66 of 182 bit 1/bert error counter overflow (beco). a latched bit that is set when the 24-bit bert error counter (bec) overflows. cleared when read and is not set again until another overflow occurs. bit 2/bert bit counter overflow (bbco). a latched bit that is set when the 32-bit bert bit counter (bbc) overflows. cleared when read and is not set again until another overflow occurs. bit 3/bit error detected (bed). a latched bit that is set when a bit error is detected. the receive bert must be in synchronization for it to detect bit errors. cleared when read. bit 4/receive loss of synchronization (rlos). a latched bit that is set whenever the receive bert begins searching for a pattern. once synchronization is achieved, this bit remains set until read. bit 5/receive all zeros (ra0). a latched bit that is set when 31 consecutive 0s are received. allowed to be cleared once a 1 is received. bit 6/receive all ones (ra1). a latched bit that is set when 31 consecutive 1s are received. allowed to be cleared once 0 is received. bits 8 to 15/bert 24-bit error counter (bec). lower word of the 24-bit error counter. see the bertec1 register description for details. register name: bertec1 register description: bert 24-bit error counter (upper) register address: 051ch bit # 7 6 5 4 3 2 1 0 name bert 24-bit error counter default 0 0 0 0 0 0 0 0 bit # 15 14 13 12 11 10 9 8 name bert 24-bit error counter (upper byte) default 0 0 0 0 0 0 0 0 note: bits that are underlined are read-only; all other bits are read-write. default value for all bits is 0. bits 0 to 15/bert 24-bit error counter (bec). upper two words of the 24-bit error counter. this 24-bit counter increments for each data bit received in error. this counter is not disabled when the receive bert loses synchronization. this counter is loaded with the current bit count value when the lc control bit in the bertc0 register is toggled from low (0) to hi gh (1). when full, this counter saturates and sets the beco status bit.
DS31256 256-channel, high-thro ughput hdlc controller 67 of 182 7. hdlc 7.1 general description the DS31256 contains two different types of hdlc c ontrollers. each port has a slow hdlc engine (type #1) associated with it that can operate in either a channelized mode up to 8.192mbps or an unchannelized mode at rates up to 10mbps. ports 0 a nd 1 also have an additional fast hdlc engine (type #2) that can operate in only an unchannelized fashion up to 52mbps. through the layer 1 registers (section 6.2 ), the host determines which type of hdlc controller is used on a port and if the hdlc controller is to be operated in either a channelized or unchannelized mode. if the hdlc controller is to be operated in the channelized mode, then the layer 1 registers (section 6.3 ) also determine which hdlc channels are associated with which ds0 channels. if the fast hdlc engine is enabled on port 0, hdlc channel 1 is assigned to it and, likewise, hdlc ch annel 2 is assigned to the fast hdlc engine on port 1 if it is enabled. the hdlc controllers can handle all required normal real-time tasks. table 7-b lists all the functions supported by the receive hdlc and table 7-c lists all the functions supported by the transmit hdlc. each of the 256 hdlc channels within the DS31256 envoy are configured by the host through the receive hdlc channel definition (rhcd) and transmit channel definition (thcd) registers. there is a separate rhcd and thcd register for each hdlc channel. the host can access the rhcd and thcd registers indirectly through the rhcdis indirect select and thcdis indirect select registers. see section 7.2 for details. on the receive side, one of the outcomes shown in table 7-a occurs when the hdlc block is processing a packet. for each packet, one of these outcomes is reported in the receive done-queue descriptor (section 9.2.4 ). on the transmit side, when the hdlc block is processing a packet, an error in the pci block (parity or target abort) or transmit fifo underflow causes the hdlc block to send an abort sequence (eight 1s in a row) followed continuously by the selected interfill (either 7eh or ffh) until the hdlc channel is reset by the transmit dma block (section 9.3.1 ). this same sequence of events will occur even if the transmit hdlc channel is being operated in the transparent mode. in the transparent mode, when the fifo empties the device sends either 7eh or ffh. if any of the 256 receive hdlc channels detects an abort sequence, an fcs checksum error, or if the packet length was incorrect, then the appropriate status bit in sdma is set. if enabled, the setting of any of these statuses can cause a hardware interrupt to occur. see section 5.3.2 for details about the operation of these status bits. table 7-a. receive hdlc packet processing outcomes outcome criteria eof/normal packet integral number of packets > min and < max is received and crc is okay eof/bad fcs integral number of packets > mi n and < max is received and crc is bad abort detected seven or more 1s in a row detected eof/too few bytes fewer than 4 or 6 bytes received too many bytes greater than the packet maximum is received (if detection enabled) eof/bad # of bits not an inte gral number of bytes received fifo overflow tried to write a byte into an already full fifo
DS31256 256-channel, high-thro ughput hdlc controller 68 of 182 table 7-b. receive hdlc functions function description zero destuff this operation is disabled if the channel is set to transparent mode. flag detection and byte alignment okay to have two packets separated by only one flag or by two flags sharing a 0. this operation is disabled if the channel is set to transparent mode. octet length check the minimum check is for 4 bytes with crc-16 and 6 bytes with crc-32 (packets with less than the minimum length s are not passed to the pci bus). the maximum check is programmable up to 65,536 bytes through the rhpl register. the maximum check can be disabled thr ough the rold control bit in the rhcd register. the minimum and maximum counts include the fcs. an error is also reported if a noninteger number of octets occur between flags. crc check can be either set to crc-16 or crc-32 or none. the crc can be passed through to the pci bus or not. the crc check is disabled if the channel is set to transparent mode. abort detection checks for seven or more 1s in a row. invert data all data (including the flags and fcs) is inverted before hdlc processing. also available in the transparent mode. bit flip the first bit received becomes either the lsb (normal mode) or the msb (telecom mode) of the byte stored in the fifo. also available in the transparent mode. transparent mode if enabled, flag detection, zero destuffing, abort detection, length checking, and fcs checking are disabled. data is passed to the pci bus on octet (i.e., byte) boundaries in channelized operation. table 7-c. transmit hdlc functions zero stuffing only used between opening and closing flags. is disabled between a closing flag and an opening flag and for sending aborts and/or interfill data. disabled if the channel is set to the transparent mode. interfill selection can be either 7eh or ffh. flag generation a programmable number of flags (1 to 16) can be set between packets. disabled if the channel is set to the transparent mode. crc generation can be either crc-16 or crc-32 or none. disabled if the channel is set to transparent mode. invert data all data (including the flags and fcs) is inverted after processing. also available in the transparent mode. bit flip the lsb (normal mode) of the byte from the fifo becomes the first bit sent or the msb (telecom mode) becomes the first bit sent. also available in the transparent mode. transparent mode if enabled, flag generation, zero stuffing, and fcs generation is disabled. passes bytes from the pci bus to layer 1 on octet (byte) boundaries. invert fcs when enabled, it inverts all of the bits in the fcs (useful for hdlc testing).
DS31256 256-channel, high-thro ughput hdlc controller 69 of 182 7.2 hdlc register description register name: rhcdis register description: receive hdlc channel definition indirect select register address: 0400h bit # 7 6 5 4 3 2 1 0 name hcid7 hcid6 hcid5 hcid4 hcid3 hcid2 hcid1 hcid0 default 0 0 0 0 0 0 0 0 bit # 15 14 13 12 11 10 9 8 name iab iarw n/a n/a n/a n/a n/a n/a default 0 0 0 0 0 0 0 0 note: bits that are underlined are read-only; all other bits are read-write. bits 0 to 7/hdlc channe l id (hcid0 to hcid7) 00000000 (00h) = hdlc channel number 1 (also used for the fast hdlc engine on port 0) 00000001 (01h) = hdlc channel number 2 (also used for the fast hdlc engine on port 1) 00000010 (02h) = hdlc channel number 3 (also used for the fast hdlc engine on port 2) 00000011 (03h) = hdlc channel number 4 11111111 (ffh) = hdlc channel number 256 bit 14/indirect access read/write (iarw). when the host wishes to read data from the internal receive hdlc definition ram, the host should write this bit to 1. this causes the device to begin obtaining the data from the channel location indicated by the hcid bits. during the read access, the iab bit is set to 1. once the data is ready to be read from the rhcd register, the iab bit is set to 0. when the host wishes to write data to the internal receive hdlc definition ram, the host should write this bit to 0. this causes the device to take the data that is currently present in the rhcd register and write it to th e channel location indicated by the hcid bits. when the device completes the write, the iab is set to 0. bit 15/indirect access busy (iab). when an indirect read or write access is in progress, this read-only bit is set to 1. during a read operation, this bit sets to 1 until the data is ready to be read. it is set to 0 when the data is ready to be read. during a write operation, this bit is set to 1 while the write is taking place. it is set to 0 once the write operation completes. register name: rhcd register description: receive hdlc channel definition register address: 0404h bit # 7 6 5 4 3 2 1 0 name rabtd rcs rbf rid rcrc1 rcrc0 rold rtrans default 0 0 0 0 0 0 0 0 bit # 15 14 13 12 11 10 9 8 name n/a n/a n/a n/a n/a n/a n/a rzdd default 0 0 0 0 0 0 0 0 note: bits that are underlined are read-only; all other bits are read-write. bit 0/receive transparent enable (rtrans). when this bit is set low, the hdlc controller performs flag delineation, zero destuffing, abort detection, octet length checking (if enabled through rold), and fcs checking (if enabled through rcrc0/1). when this bit is set hig h, the hdlc controller does not perform flag delineation,
DS31256 256-channel, high-thro ughput hdlc controller 70 of 182 zero destuffing, and abort detection, octet length check ing, or fcs checking. when in transparent mode, the device must not be configured to write done-queue descriptors only at the end of a packet, if it is desired that done- queue descriptors be written; there is not an end of packet on the receive side in transparent mode by definition. please note that an end of packet does not occur on the receive side while in transparent mode. 0 = transparent mode disabled 1 = transparent mode enabled bit 1/receive octet length-detection enable (rold). when this bit is set low, the hdlc engine does not check to see if the octet length of the received packet s exceeds the count loaded into the receive hdlc packet length (rhpl) register. when this bit is set high, the hdlc engine checks to see if the octet length of the received packets exceeds the count loaded into the rhpl register . when an incoming packet exceeds the maximum length, the packet is aborted and the remainder is discarded. this bit is ignored if the hdlc channel is set to transparent mode (rtrans = 1). 0 = octet length detection disabled 1 = octet length detection enabled bits 2, 3/receive crc selection (rcrc0/rcrc1). these two bits are ignored if the hdlc channel is set into transparent mode (rtrans = 1). rcrc1 rcrc0 action 0 0 no crc verification performed 0 1 16-bit crc (ccitt/itu q.921) 1 0 32-bit crc 1 1 illegal state bit 4/receive invert data enable (rid). when this bit is set low, the in coming hdlc packets are not inverted before processing. when this bit is set high, the hdlc engine inverts all the data (flags, information fields, and fcs) before processing the data. the data is not reinverted before passing to the fifo. 0 = do not invert data 1 = invert all data (including flags and fcs) bit 5/receive bit flip (rbf). when this bit is set low, the hdlc engine places the first hdlc bit received in the lowest bit position of the pci bus bytes (i.e., pad[0], pad[ 8], pad[16], pad[24]). when this bit is set high, the hdlc controller places the first hdlc bit received in the highest bit position of the pci bus bytes (i.e., pad[7], pad[15], pad[23], pad[31]). 0 = the first hdlc bit received is placed in the lowest bit position of the bytes on the pci bus 1 = the first hdlc bit received is placed in the highest bit position of the bytes on the pci bus bit 6/receive crc strip enable (rcs). when this bit is set high, the fcs is not transferred through to the pci bus. when this bit is set low, the hdlc engine includes the 2-byte fcs (16-bit) or 4-byte fcs (32-bit) in the data that it transfers to the pci bus. this bit is ignor ed if the hdlc channel is set into transparent mode (rtrans = 1). 0 = send fcs to the pci bus 1 = do not send the fcs to the pci bus bit 7/receive abort disable (rabtd). when this bit is set low, the hdlc engine examines the incoming data stream for the abort sequence, which is seven or more consecutive 1s. when this bit is set high, the incoming data stream is not examined for the abort sequence, and, if an incoming abort sequence is received, no action is taken. this bit is ignored when the hdlc controller is configured in the transparent mode (rtrans = 1). bit 8/receive zero destuffing disable (rzdd). when this bit is set low, the hdlc engine zero destuffs the incoming data stream. when this bit is set high, the hdlc engine does not zero destuff the incoming data stream. this bit is ignored when the hdlc engine is co nfigured in the transparent mode (rtrans = 1).
DS31256 256-channel, high-thro ughput hdlc controller 71 of 182 register name: rhpl register description: receive hdlc maximum packet length register address: 0410h bit # 7 6 5 4 3 2 1 0 name rhpl7 rhpl6 rhpl5 rhpl 4 rhpl3 rhpl2 rhpl1 rhpl0 default 0 0 0 0 0 0 0 0 bit # 15 14 13 12 11 10 9 8 name rhpl15 rhpl14 rhpl13 rhpl 12 rhpl11 rhpl10 rhpl9 rhpl8 default 0 0 0 0 0 0 0 0 note: bits that are underlined are read-only; all other bits are read-write. this is a globe control; only one per device, not one f or each individual hdlc channel. bits 0 to 15/receive hdlc packet length (rhpl0 to rhpl15). if the receive length-detection enable bit is set to 1, the hdlc engine checks the number of received octets in a packet to see if they exceed the count in this register. if the length is exceeded, the packet is aborted and the remainder is discarded. the definition of ?octet length? is everything between the opening and closing flags, which includes the address field, control field, information field, and fcs. register name: thcdis register description: transmit hdlc channel definition indirect select register address: 0480h bit # 7 6 5 4 3 2 1 0 name hcid7 hcid6 hcid5 hcid4 hcid3 hcid2 hcid1 hcid0 default 0 0 0 0 0 0 0 0 bit # 15 14 13 12 11 10 9 8 name iab iarw n/a n/a n/a n/a n/a n/a default 0 0 0 0 0 0 0 0 note: bits that are underlined are read-only; all other bits are read-write. bits 0 to 7/hdlc channe l id (hcid0 to hcid7) 00000000 (00h) = hdlc channel number 1 (also used for the fast hdlc engine on port 0) 00000001 (01h) = hdlc channel number 2 (also used for the fast hdlc engine on port 1) 00000010 (02h) = hdlc channel number 3 (also used for the fast hdlc engine on port 2) 00000011 (03h) = hdlc channel number 4 11111111 (ffh) = hdlc channel number 256 bit 14/indirect access read/write (iarw). when the host wishes to read data from the internal transmit hdlc definition ram, this bit should be written to 1 by the host. this causes the device to begin obtaining the data from the channel location indicated by the hcid bits. during the read access, the iab bit is set to 1. once the data is ready to be read from the thcd register, the iab bit is set to 0. when the host wishes to write data to the internal transmit hdlc definition ram, this bit should be written to 0 by the host. this causes the device to take the data that is currently present in the thcd register and write it to the channel location indicated by the hcid bits. when the device completes the write, the iab is set to 0. bit 15/indirect access busy (iab). when an indirect read or write access is in progress, this read-only bit is set to 1. during a read operation, this bit is set to 1 until the data is ready to be read. it is set to 0 when the data is ready to be read. during a write operation, this bit is set to 1 while the write is taking place. it is set to 0 once the write operation is complete.
DS31256 256-channel, high-thro ughput hdlc controller 72 of 182 register name: thcd register description: transmit hdlc channel definition register address: 0484h bit # 7 6 5 4 3 2 1 0 name tabte tcfcs tbf tid tcrc1 tcrc0 tifs ttrans default bit # 15 14 13 12 11 10 9 8 name n/a n/a n/a tzsd tfg3 tfg2 tfg1 tfg0 default note: bits that are underlined are read only, all other bits are read-write. bit 0/transmit transparent enable (ttrans). when this bit is set low, the hdlc engine generates flags and the fcs (if enabled through tcrc0/1) and performs zero stuffing. when this bit is set high, the hdlc engine does not generate flags or the fcs and does not perform zero stuffing. 0 = transparent mode disabled 1 = transparent mode enabled bit 1/transmit interfill select (tifs) 0 = the interfill byte is 7eh (01111110) 1 = the interfill byte is ffh (11111111) bits 2, 3/transmit crc selection (tcrc0/tcrc1). these bits are ignored if the hdlc channel is set to transparent mode (ttrans = 1). tcrc1 tcrc0 action 0 0 no crc is generated 0 1 16-bit crc (ccitt/itu q.921) 1 0 32-bit crc 1 1 illegal state bit 4/transmit invert data enable (tid). when this bit is set low, the outgoing hdlc packets are not inverted after being generated. when this bit is set high, the hdlc engine inverts all the data (flags, information fields, and fcs) after the packet has been generated. 0 = do not invert data 1 = invert all data (including flags and fcs) bit 5/transmit bit flip (tbf). when this bit is set low, the hdlc engine obtains the first hdlc bit to be transmitted from the lowest bit position of the pci bus bytes (i.e., pad[0], pad[8], pad[16], pad[24]). when this bit is set high, the hdlc engine obtains the first hdlc bit to be transmitted from the highest bit position of the pci bus bytes (i.e., pad[7], pad[15], pad[23], pad[31]). 0 = the first hdlc bit transmitted is obtained from the lowest bit position of the bytes on the pci bus 1 = the first hdlc bit transmitted is obtained from the highest bit position of the bytes on the pci bus bit 6/transmit corrupt fcs (tcfcs). when this bit is set low, the hdlc engine allows the frame checksum sequence (fcs) to be transmitted as generated. when this bit is set high, the hdlc engine inverts all the bits of the fcs before transmission occurs. this is useful in debugging and testing hdlc channels at the system level. 0 = generate fcs normally 1 = invert all fcs bits bit 7/transmit abort enable (tabte). when this bit is set low, the hdlc engine performs normally, only sending an abort sequence (eight 1s in a row) when an error occurs in the pci block or the fifo underflows. when this bit is set high, the hdlc engine continuously transmits an all-ones pattern (i.e., an abort sequence). this bit is still active when the hdlc engine is configured in the transparent mode (ttrans = 1).
DS31256 256-channel, high-thro ughput hdlc controller 73 of 182 bits 8 to 11/transmit flag generation bits 0 to 3 (tfg0/tfg1/tfg2/tfg3). these four bits determine how many flags and interfill bytes are sent between consecutive packets. tfg3 tfg2 tfg1 tfg0 action 0 0 0 0 share closing and opening flag 0 0 0 1 closing flag/no interfill bytes/opening flag 0 0 1 0 closing flag/1 interfill byte/opening flag 0 0 1 1 closing flag/2 interfill bytes/opening flag 0 1 0 0 closing flag/3 interfill bytes/opening flag 0 1 0 1 closing flag/4 interfill bytes/opening flag 0 1 1 0 closing flag/5 interfill bytes/opening flag 0 1 1 1 closing flag/6 interfill bytes/opening flag 1 0 0 0 closing flag/7 interfill bytes/opening flag 1 0 0 1 closing flag/8 interfill bytes/opening flag 1 0 1 0 closing flag/9 interfill bytes/opening flag 1 0 1 1 closing flag/10 interfill bytes/opening flag 1 1 0 0 closing flag/11 interfill bytes/opening flag 1 1 0 1 closing flag/12 interfill bytes/opening flag 1 1 1 0 closing flag/13 interfill bytes/opening flag 1 1 1 1 closing flag/14 interfill bytes/opening flag bit 12/transmit zero stuffing disable (tzsd). when this bit is set low, the hdlc engine performs zero stuffing on the outgoing data stream. when this bit is set high, the outgoing data stream is not zero stuffed. this bit is ignored when the hdlc engine is configured in the transparent mode (ttrans = 1).
DS31256 256-channel, high-thro ughput hdlc controller 74 of 182 8. fifo 8.1 general description and example the DS31256 contains one 16kb fifo for the receive path and another 16kb fifo for the transmit path. both of these fifos are organized into blocks. sin ce a block is defined as 4 dwords (16 bytes), each fifo is made up of 1024 blocks. figure 8-1 shows an fifo example. the fifo contains a state machine that is constantly polling the 16 ports to determine if any data is ready for transfer to/from the fifo from/to the hdlc engines. the 16 ports are priority decoded with port 0 getting the highest priority and port 15 getting the lowest priority. therefore, all the enabled hdlc channels on the lower numbered ports are serviced before the higher numbered ports. as long as the maximum throughput rate of 132mbps is not exceede d, the DS31256 ensures there is enough bandwidth in this transfer to prevent any data loss between the hdlc engines and the fifo. the fifo also controls which hdlc channel the dma should service to read data out of the fifo on the receive side and to write data into the fifo on the transmit side. which channel gets the highest priority from the fifo is configurable through some control bits in the master configuration register (section 5.2 ). there are two control bits for the receive side (rfpc0 and rfpc1) and two control bits for the transmit side (tfpc0 and tfpc1) that determine the priority algorithm as shown in table 8-a . table 8-a. fifo priority algorithm select option hdlc channels that are priority decoded hdlc channels that are serviced round robin 1 none 1 to 256 2 1 to 3 4 to 256 3 16 to 1 17 to 256 4 64 to 1 65 to 256 to maintain maximum flexibility for channel rec onfiguration, each block within the fifo can be assigned to any of the 256 hdlc channels. also, blocks are link-listed together to form a chain whereby each block points to the next block in the chain. the minimum size of the link-listed chain is 4 blocks (64 bytes) and the maximum is the full si ze of the fifo, which is 1024 blocks. to assign a set of blocks to a particular hdlc cha nnel, the host must configure the starting block pointer and the block pointer ram. the star ting block pointer assigns a partic ular hdlc channel to a set of link-listed blocks by pointing to one of the blocks w ithin the chain (it does not matter which block in the chain is pointed to). the block pointer ram must be co nfigured for each block that is being used within the fifo. the block pointer ram indicates the next block in the link-listed chain. figure 8-1 shows an example of how to configure the st arting block pointer and the block pointer ram. in this example, only three hdlc channels are being used (channels 2, 6, and 16). the device knows that channel 2 has been assigned to the eight link-listed blocks of 112, 118, 119, 120, 121, 122, 125, and 126 because a block pointer of 125 has been progra mmed into the channel 2 position of the starting block pointer. the block pointer ram tells the device how to link the eight blocks together to form a circular chain. the host must set the watermarks for the receive and transmit paths. the receive path has a high watermark and the transmit path has a low watermark.
DS31256 256-channel, high-thro ughput hdlc controller 75 of 182 figure 8-1. fifo example ch 1 ch 2 ch 3 ch 4 ch 5 ch 6 ch 7 ch 8 ch 9 ch 10 ch 11 ch 12 ch 13 ch 14 ch 15 ch 16 ch 17 ch 18 ch 19 ch 20 ch 21 ch 255 ch 256 not used block 0 block 1 block 2 block 3 block 4 block 5 block 6 block 112 block 113 block 114 block 115 block 116 block 117 block 118 block 119 block 120 block 121 block 122 block 123 block 124 block 125 block 126 block 127 block 1022 block 1023 not used not used not used channel 2 not used not used not used not used not used not used channel 16 channel 16 channel 16 channel 16 channel 6 channel 6 channel 2 channel 2 channel 2 channel 2 channel 2 channel 2 channel 2 block 0 block 1 block 2 block 3 block 4 block 5 block 6 block 4 block 5 block 3 block 2 block 114 block 113 block 119 block 120 block 121 block 122 block 125 block 126 block 112 block 1022 block 1023 block 121 block 122 block 123 block 124 block 125 block 126 block 127 block 112 block 113 block 114 block 115 block 116 block 117 block 118 block 119 block 120 1024 block fifo (1 block = 4 dwords) block pointer ram starting block pointer block pointer 113 block pointer 5 block pointer 125 fifobd.drw hdlc channel number not used not used not used not used not used not used not used not used not used not used not used not used not used not used not used not used not used not used not used not used not used not used block 118 not used not used not used not used not used not used not used not used not used not used
DS31256 256-channel, high-thro ughput hdlc controller 76 of 182 8.1.1 receive high watermark the high watermark tells the device how many bloc ks the hdlc engines should write into the receive fifo before the dma sends data to the pci bus, or rather, how full the fifo should get before it should be emptied by the dma. when the dma begins reading the data from the fifo, it reads all available data and tries to completely empty the fifo even if one or more eofs (end of frames) are detected. for example, if four blocks were li nk-listed together and the host progra mmed the high watermark to three blocks, then the dma would read the data out of th e fifo and transfer it to the pci bus after the hdlc controller had written three complete blocks in succession into the fifo and still had one block left to fill. the dma would not read the data out of the fifo again until another three complete blocks had been written into the fifo in succession by the hdlc engine or until an eof was detected. in this example of four blocks being link-listed together, the high watermark could also be set to 1 or 2, but no other values would be allowed. if an incoming packet does not fill the fifo enough to reach the high watermark before an eof is detected, the dma still requests that the data be sent to the pci bus; it does not wait for additional data to be written into the fifo by the hdlc engines. 8.1.2 transmit low watermark the low watermark tells the device how many blocks should be left in the fifo before the dma should begin getting more data from the pci bus, or rather , how empty the fifo should get before it should be filled again by the dma. when the dma begins reading the data from the pci bus, it reads all available data and tries to completely fill the fifo even if one or more eofs (hdlc packets) are detected. for example, if five blocks were li nk-listed together and the host programmed the low watermark to two blocks, then the dma would read the data from the pci bus and transfer it to the fifo after the hdlc engine has read three complete blocks in successi on from the fifo and, therefore, still had two blocks left before the fifo was empty. the dma would not read the data from the pci bus again until another three complete blocks had been read from the fifo in succession by the hdlc engines. in this example of five blocks being link-listed together, the low watermark could also be set to any value from 1 to 3 (inclusive) but no other values woul d be allowed. in other words, the tranmist low watermark can be set to a value of 1 to n - 2, where n = number of blocks linked together. when a new packet is written into a completely empty fifo by the dma, the hdlc engines wait until the fifo fills beyond the low watermark or until an eof is seen before reading the data out of the fifo. 8.2 fifo register description register name: rfsbpis register description: receive fifo starting block pointer indirect select register address: 0900h bit # 7 6 5 4 3 2 1 0 name hcid7 hcid6 hcid5 hcid4 hcid3 hcid2 hcid1 hcid0 default 0 0 0 0 0 0 0 0 bit # 15 14 13 12 11 10 9 8 name iab iarw n/a n/a n/a n/a n/a n/a default 0 0 0 0 0 0 0 0 note: bits that are underlined are read-only; all other bits are read-write. bits 0 to 7/hdlc channe l id (hcid0 to hcid7) 00000000 (00h) = hdlc channel number 1 11111111 (ffh) = hdlc channel number 256
DS31256 256-channel, high-thro ughput hdlc controller 77 of 182 bit 14/indirect access read/write (iarw). when the host wishes to write data to set the internal receive starting block pointer, the host should write this bit to 0. this causes the device to take data that is currently presetn in the rfsbp register and write it to the channel location indicated by the hcid bits. when the device completes the write, the iab is set to 0. bit 15/indirect access busy (iab). when an indirect read or write access is in progress, this read-only bit is set to 1. during a read operation, this bit is set to 1 until the data is ready to be read. it is set to 0 when the data is ready to be read. during a write operation, this bit is set to 1 while the write is taking place. it is set to 0 once the write operation completes. register name: rfsbp register description: receive fifo starting block pointer register address: 0904h bit # 7 6 5 4 3 2 1 0 name rsbp7 rsbp6 rsbp5 rsbp4 rsbp3 rsbp2 rsbp1 rsbp0 default bit # 15 14 13 12 11 10 9 8 name n/a n/a n/a n/a n/a n/a rsbp9 rsbp8 default note: bits that are underlined are read-only; all other bits are read-write. bits 0 to 9/starting block pointer (rsbp0 to rsbp9). these bits determine which of the 1024 blocks within the receive fifo the host wants the device to configure as the starting block for a particular hdlc channel. any of the blocks within a chain of blocks for an hdlc channel can be configured as the starting block. when these bits are read, they report the current block pointer being used to write data into the receive fifo from the hdlc layer 2 engines. 0000000000 (000h) = use block 0 as the starting block 0111111111 (1ffh) = use block 511 as the starting block 1111111111 (3ffh) = use block 1023 as the starting block register name: rfbpis register description: receive fifo block pointer indirect select register address: 0910h bit # 7 6 5 4 3 2 1 0 name blkid7 blkid6 blkid5 blkid4 blkid3 blkid2 blkid1 blkid0 default 0 0 0 0 0 0 0 0 bit # 15 14 13 12 11 10 9 8 name iab iarw n/a n/a n/a n/a blkid9 blkid8 default 0 0 0 0 0 0 0 0 note: bits that are underlined are read-only; all other bits are read-write. bits 0 to 9/block id (blkid0 to blkid9) 0000000000 (000h) = block number 0 0111111111 (1ffh) = block number 511 1111111111 (3ffh) = block number 1023 bit 14/indirect access read/write (iarw). when the host wishes to read data from the internal receive block pointer ram, the host should write this bit to 1. this causes the device to begin obtaining the data from the block location indicated by the blkid bits. during the read access, the iab bit is set to 1. once the data is ready to be read from the rfbp register, the iab bit is set to 0. when the host wishes to write data to the internal receive
DS31256 256-channel, high-thro ughput hdlc controller 78 of 182 block pointer ram, the host should write this bit to 0. this causes the device to take the data that is currently present in the rfbp register and write it to the channe l location indicated by the blkid bits. when the device completes the write, the iab is set to 0. note: the rfsbp is write-only memory. once this register has been written to and the operation has started, the DS31256 internal state machine changes the value in this memory. bit 15/indirect access busy (iab). when an indirect read or write access is in progress, this read-only bit is set to 1. during a read operation, this bit is set to 1 until the data is ready to be read. it is set to 0 when the data is ready to be read. during a write operation, this bit is set to 1 while the write is taking place. it is set to 0 once the write operation completes. register name: rfbp register description: receive fifo block pointer register address: 0914h bit # 7 6 5 4 3 2 1 0 name rbp7 rbp6 rbp5 rbp4 rbp3 rbp2 rbp1 rbp0 default bit # 15 14 13 12 11 10 9 8 name n/a n/a n/a n/a n/a n/a rbp9 rbp8 default note: bits that are underlined are read only, all other bits are read-write. bits 0 to 9/block pointer (rbp0 to rbp9). these bits indicate which of the 10242 blocks is the next block in the link-list chain. a block is not allowed to point to itself. 0000000000 (000h) = block 0 is the next linked block 0111111111 (1ffh) = block 511 is the next linked block 1111111111 (3ffh) = block 1023 is the next linked block register name: rfhwmis register description: receive fifo high-watermark indirect select register address: 0920h bit # 7 6 5 4 3 2 1 0 name hcid7 hcid6 hcid5 hcid4 hcid3 hcid2 hcid1 hcid0 default 0 0 0 0 0 0 0 0 bit # 15 14 13 12 11 10 9 8 name iab iarw n/a n/a n/a n/a n/a n/a default 0 0 0 0 0 0 0 note: bits that are underlined are read-only; all other bits are read-write. bits 0 to 7/hdlc channe l id (hcid0 to hcid7) 00000000 (00h) = hdlc channel number 1 11111111 (ffh) = hdlc channel number 256 bit 14/indirect access read/write (iarw). when the host wishes to read data from the internal receive high- watermark ram, this bit should be written to 1 by the host. this causes the device to begin obtaining the data from the channel location indicated by the hcid bits. during the read access, the iab bit is set to 1. once the data is ready to be read from the rfhwm register, the iab bit is set to 0. when the host wishes to write data to the internal receive high-watermark ram, this bit should be written to 0 by the host. this causes the device to take
DS31256 256-channel, high-thro ughput hdlc controller 79 of 182 the data that is currently present in the rfhwm register and write it to the channel location indicated by the hcid bits. when the device has completed the write, the iab is set to 0. bit 15/indirect access busy (iab). when an indirect read or write access is in progress, this read-only bit is set to 1. during a read operation, this bit is set to 1 until the data is ready to be read. it is set to 0 when the data is ready to be read. during a write operation, this bit is set to 1 while the write is taking place. it is set to 0 once the write operation has completed. register name: rfhwm register description: receive fifo high watermark register address: 0924h bit # 7 6 5 4 3 2 1 0 name rhwm7 rhwm6 rhwm5 rhwm4 rhwm3 rhwm2 rhwm1 rhwm0 default bit # 15 14 13 12 11 10 9 8 name n/a n/a n/a n/a n/a n/a rhwm9 rhwm8 default note: bits that are underlined are read-only; all other bits are read-write. bits 0 to 9/high watermark (rhwm0 to rhwm9). these bits indicate the setting of the receive high- watermark. the high-watermark setting is the number of successive blocks that the hdlc controller writes to the fifo before the dma sends the data to the pci bus. the high-watermark setting must be between (inclusive) one block and one less than the number of blocks in the link-list chain for the particular channel involved. for example, if four blocks are linked together, the high watermark can be set to either 1, 2, or 3. in other words, the high watermark can be set to a value of 1 to n - 1, where n = number of block linked together. any other numbers are illegal. 0000000000 (000h) = invalid setting 0000000001 (001h) = high watermark is 1 block 0000000010 (002h) = high watermark is 2 blocks 0111111111 (1ffh) = high watermark is 511 blocks 1111111111 (3ffh) = high watermark is 1023 blocks register name: tfsbpis register description: transmit fifo starting block pointer indirect select register address: 0980h bit # 7 6 5 4 3 2 1 0 name hcid7 hcid6 hcid5 hcid4 hcid3 hcid2 hcid1 hcid0 default 0 0 0 0 0 0 0 0 bit # 15 14 13 12 11 10 9 8 name iab iarw n/a n/a n/a n/a n/a n/a default 0 0 0 0 0 0 0 0 note: bits that are underlined are read-only; all other bits are read-write.
DS31256 256-channel, high-thro ughput hdlc controller 80 of 182 bits 0 to 7/hdlc channe l id (hcid0 to hcid7) 00000000 (00h) = hdlc channel number 1 11111111 (ffh) = hdlc channel number 256 bit 14/indirect access read/write (iarw). when the host wishes to write data to the internal transmit starting block pointer ram, this bit should be written to 1 by the host. this causes the device to take the data that is in the tfsbp register and write it to the channel location indicated by the hcid bits. when the device has completed the write, the iab is set to 0. note: the tfsbp register is write-only memory. once this register has been written to and the operation has started, the DS31256 internal state machine changes the value in this memory. bit 15/indirect access busy (iab). when an indirect read or write access is in progress, this read-only bit is set to 1. during a read operation, this bit is set to 1 until the data is ready to be read. it is set to 0 when the data is ready to be read. during a write operation, this bit is set to 1 while the write is taking place. it is set to 0 once the write operation has completed. register name: tfsbp register description: transmit fifo starting block pointer register address: 0984h bit # 7 6 5 4 3 2 1 0 name tsbp7 tsbp6 tsbp5 tsbp4 tsbp3 tsbp2 tsbp1 tsbp0 default bit # 15 14 13 12 11 10 9 8 name n/a n/a n/a n/a n/a n/a tsbp9 tsbp8 default note: bits that are underlined are read-only; all other bits are read-write. bits 0 to 9/starting block pointer (tsbp0 to tsbp9). these bits determine which of the 1024 blocks within the transmit fifo the host wants the device to configure as the starting block for a particular hdlc channel. any of the blocks within a chain of blocks for an hdlc channel can be configured as the starting block. when these bits are read, they report the current block pointer being used to read data from the transmit fifo by the hdlc layer 2 engines. 0000000000 (000h) = use block 0 as the starting block 0111111111 (1ffh) = use block 511 as the starting block 1111111111 (3ffh) = use block 1023 as the starting block register name: tfbpis register description: transmit fifo block pointer indirect select register address: 0990h bit # 7 6 5 4 3 2 1 0 name blkid7 blkid6 blkid5 blkid4 blkid3 blkid2 blkid1 blkid0 default 0 0 0 0 0 0 0 0 bit # 15 14 13 12 11 10 9 8 name iab iarw n/a n/a n/a n/a blkid9 blkid8 default 0 0 0 0 0 0 0 0 note: bits that are underlined are read-only; all other bits are read-write.
DS31256 256-channel, high-thro ughput hdlc controller 81 of 182 bits 0 to 9/block id (blkid0 to blkid9) 00000000000 (000h) = block number 0 01111111111 (1ffh) = block number 511 1111111111 (3ffh) = block number 1023 bit 14/indirect access read/write (iarw). when the host wishes to read data from the internal transmit block pointer ram, this bit should be written to 1 by the host. this causes the device to begin obtaining the data from the block location indicated by the blkid bits. during the read access, the iab bit is set to 1. once the data is ready to be read from the tfbp register, the iab bit is set to 0. when the host wishes to write data to the internal transmit block pointer ram, this bit should be written to 0 by the host. this causes the device to take the data that is currently present in the tfbp register and write it to the channel location indicated by the blkid bits. when the device has completed the write, the iab is set to 0. bit 15/indirect access busy (iab). when an indirect read or write access is in progress, this read-only bit is set to 1. during a read operation, this bit is set to 1 until the data is ready to be read. it is set to 0 when the data is ready to be read. during a write operation, this bit is set to 1 while the write is taking place. it is set to 0 once the write operation has completed. register name: tfbp register description: transmit fifo block pointer register address: 0994h bit # 7 6 5 4 3 2 1 0 name tbp7 tbp6 tbp5 tbp4 tbp3 tbp2 tbp1 tbp0 default bit # 15 14 13 12 11 10 9 8 name n/a n/a n/a n/a n/a n/a tbp9 tbp8 default note: bits that are underlined are read-only; all other bits are read-write . bits 0 to 9/block pointer (tbp0 to tbp9). these bits indicate which of the 1024 blocks is the next block in the link list chain. a block is not allowed to point to itself. 0000000000 (000h) = block 0 is the next linked block 0111111111 (1ffh) = block 511 is the next linked block 1111111111 (3ffh) = block 1023 is the next linked block register name: tflwmis register description: transmit fifo low-watermark indirect select register address: 09a0h bit # 7 6 5 4 3 2 1 0 name hcid7 hcid6 hcid5 hcid4 hcid3 hcid2 hcid1 hcid0 default 0 0 0 0 0 0 0 0 bit # 15 14 13 12 11 10 9 8 name iab iarw n/a n/a n/a n/a n/a n/a default 0 0 0 0 0 0 0 0 note: bits that are underlined are read-only, all other bits are read-write. bits 0 to 7/hdlc channe l id (hcid0 to hcid7) 00000000 (00h) = hdlc channel number 1 11111111 (ffh) = hdlc channel number 256
DS31256 256-channel, high-thro ughput hdlc controller 82 of 182 bit 14/indirect access read/write (iarw). when the host wishes to read da ta from the internal transmit low- watermark ram, this bit should be written to 1 by the host. this causes the device to begin obtaining the data from the channel location indicated by the hcid bits. during the read access, the iab bit is set to 1. once the data is ready to be read from the tflwm register, the iab bit is set to 0. when the host wishes to write data to the internal transmit low-watermark ram, this bit should be written to 0 by the host. this causes the device to take the data that is currently present in the tflwm register and write it to the channel location indicated by the hcid bits. when the device has completed the write, the iab is set to 0. bit 15/indirect access busy (iab). when an indirect read or write access is in progress, this read-only bit is set to 1. during a read operation, this bit is set to 1 until the data is ready to be read. it is set to 0 when the data is ready to be read. during a write operation, this bit is set to 1 while the write is taking place. it is set to 0 once the write operation has completed. register name: tflwm register description: transmit fifo low watermark register address: 09a4h bit # 7 6 5 4 3 2 1 0 name tlwm7 tlwm6 tlwm5 tlwm4 tlwm3 tlwm2 tlwm1 tlwm0 default bit # 15 14 13 12 11 10 9 8 name n/a n/a n/a n/a n/a n/a tlwm9 tlwm8 default note: bits that are underlined are read-only; all other bits are read-write. bits 0 to 9/low watermark (tlwm0 to tlwm9). these bits indicate the setting of the transmit low watermark. the low watermark setting is the number of bl ocks left in the transmit fifo before the dma gets more data from the pci bus. the low-watermark setting mu st be between (inclusive) one block and one less than the number of blocks in the link-list chain for the particul ar channel involved. for example, if five blocks are linked together, the low watermark can be set to 1, 2, or 3. in other words, the low watermark can be set at a value of 1 to n - 2, where n = numb er of block linked together. any other numbers are illegal . 0000000000 (000h) = invalid setting 0000000001 (001h) = low watermark is 1 block 0000000010 (002h) = low watermark is 2 blocks 0111111111 (1ffh) = low watermark is 511 blocks 1111111111 (3ffh) = low watermark is 1023 blocks
DS31256 256-channel, high-thro ughput hdlc controller 83 of 182 9. dma 9.1 introduction the dma block ( figure 2-1 ) handles the transfer of packet data from the fifo block to the pci block and vice versa. throughout this section, the terms host and d escriptor are used. host is defined as the cpu or intelligent controller that sits on the pci bus and instructs the device about how to handle the incoming and outgoing packet data. descriptor is defined as a preformatte d message that is passed from the host to the dma block or vice versa to indicate where packet data should be placed or obtained from. on power-up, the dma is disabled because the rde a nd tde control bits in th e master configuration register (section 5 ) are set to 0. the host must configure the dma by writing to all of the registers listed in table 9-a (which includes all 256 channel locations in the receive and trans mit configuration rams), then enable the dma by setting to the rde and tde control bits to 1. the structure of the dma is such that the receive- and transmit-side descriptor-address spaces can be shared, even among multiple chips on the same bus. through the master control register, the host determines how long the dma is allowed to burst ont o the pci bus. the default value is 32 dwords (128 bytes) but, through the dt0 and dt1 control bits, th e host can enable the receive or transmit dmas to burst either 64 dwords (256 bytes), 128 dwor ds (512 bytes), or 256 dwords (1024 bytes). the receive and transmit packet descriptors have almost identical structures (sections 9.2.2 and 9.3.2 ), which provide a minimal amount of host intervention in store-and-forward applications. in other words, the receive descriptors created by the receive dma can be used directly by the transmit dma. the receive and transmit portions of the dma are comple tely independent and ar e discussed separately.
DS31256 256-channel, high-thro ughput hdlc controller 84 of 182 table 9-a. dma registers to be configured by the host on power-up address name register section 0700 rfqba0 receive free-queue base address 0 (lower word) 9.2.3 0704 rfqba1 receive free-queue base address 1 (upper word) 9.2.3 0708 rfqea receive free-queue end address 9.2.3 070c rfqsbsa receive free-queue small buffer start address 9.2.3 0710 rfqlbwp receive free-queue large buffer host write pointer 9.2.3 0714 rfqsbwp receive free-queue small buffer host write pointer 9.2.3 0718 rfqlbrp receive free-queue large buffer dma read pointer 9.2.3 071c rfqsbrp receive free-queue small buffer dma read pointer 9.2.3 0730 rdqba0 receive done-queue base address 0 (lower word) 9.2.4 0734 rdqba1 receive done-queue base address 1 (upper word) 9.2.4 0738 rdqea receive done-queue end address 9.2.4 073c rdqrp receive done-queue host read pointer 9.2.4 0740 rdqwp receive done-queue dma write pointer 9.2.4 0744 rdqfft receive done-queue fifo flush timer 9.2.4 0750 rdba0 receive descriptor base address 0 (lower word) 9.2.2 0754 rdba1 receive descriptor base address 1 (upper word) 9.2.2 0770 rdmacis receive dma configuration indirect select 9.2.5 0774 rdmac receive dma configuration (all 256 channels) 9.2.5 0780 rdmaq receive dma queues control 9.2.3 , 9.2.4 0790 rlbs receive large buffer size 9.2.1 0794 rsbs receive small buffer size 9.2.1 0800 tpqba0 transmit pending-queue base address 0 (lower word) 9.3.3 0804 tpqba1 transmit pending-queue base address 1 (upper word) 9.3.3 0808 tpqea transmit pending-queue end address 9.3.3 080c tpqwp transmit pending-queue host write pointer 9.3.3 0810 tpqrp transmit pending-queue dma read pointer 9.3.3 0830 tdqba0 transmit done-queue base address 0 (lower word) 9.3.4 0834 tdqba1 transmit done-queue base address 1 (upper word) 9.3.4 0838 tdqea transmit done-queue end address 9.3.4 083c tdqrp transmit done-queue host read pointer 9.3.4 0840 tdqwp transmit done-queue dma write pointer 9.3.4 0844 tdqfft transmit done-queue fifo flush timer 9.3.4 0850 tdba0 transmit descriptor base address 0 (lower word) 9.3.2 0854 tdba1 transmit descriptor base address 1 (upper word) 9.3.2 0870 tdmacis transmit dma configuration indirect select 9.3.5 0874 tdmac transmit dma configuration (all 256 channels) 9.3.5 0880 tdmaq transmit queues fifo control 9.3.3 , 9.3.4
DS31256 256-channel, high-thro ughput hdlc controller 85 of 182 9.2 receive side 9.2.1 overview the receive dma uses a scatter-gather technique to write packet data into main memory. the host keeps track of and decides where the dma should place the incoming packet data. there are a set of descriptors that get handed back a nd forth between the dma and the host. through these descriptors, the host can inform the dma where to place the packet da ta and the dma can tell the host when the data is ready to be processed. the operation of the receive dma ha s three main areas, as shown in figure 9-1 , figure 9-2 , and table 9-b . the host writes to the free-queue descriptors informing the dma where it can place the incoming packet data. associated with each free data buffer location is a free packet descriptor where the dma can write information to inform the host about the attributes of the packet data (i.e., status information, number of bytes, etc.) that it outputs. to accommodate the various needs of packet data, the host can quantize the free data buffer space into two di fferent buffer sizes. the host sets the size of the buffers through the receive large buffer size (rlbs) and the receive small buffer size (rsbs) registers. register name: rlbs register description: receive large buffer size select register address: 0790h bit # 7 6 5 4 3 2 1 0 name lbs7 lbs6 lbs5 lbs4 lbs3 lbs2 lbs1 lbs0 default 0 0 0 0 0 0 0 0 bit # 15 14 13 12 11 10 9 8 name n/a n/a n/a lbs12 lbs11 lbs10 lbs9 lbs8 default 0 0 0 0 0 0 0 0 note: bits that are underlined are read-only; all other bits are read-write. bits 0 to 12/large buffer select bit (lbs0 to lbs12) 0000000000000 (0000h) = buffer size is 0 bytes 1111111111100 (1ffch) = buffer size is 8188 bytes register name: rsbs register description: receive small buffer size select register address: 0794h bit # 7 6 5 4 3 2 1 0 name sbs7 sbs6 sbs5 sbs4 sbs3 sbs2 sbs1 sbs0 default 0 0 0 0 0 0 0 0 bit # 15 14 13 12 11 10 9 8 name n/a n/a n/a sbs12 sbs11 sbs10 sbs9 sbs8 default 0 0 0 0 0 0 0 0 note: bits that are underlined are read-only; all other bits are read-write. bits 0 to 12/small buffer select bit (sbs0 to sbs12) 0000000000000 (0000h) = buffer size is 0 bytes 1111111111100 (1ffch) = buffer size is 8188 bytes
DS31256 256-channel, high-thro ughput hdlc controller 86 of 182 on an hdlc-channel basis in the receive dma configuration ram, the host instructs the dma how to use the large and small buffers for the incoming packet data on that particular hdlc channel. the host has three options: (1) only use large buffers, (2) only use small buffers, or (3) first fill a small buffer, then, if the incoming packet requires more buffer space, use one or more large buffers for the remainder of the packet. the host selects the option through the size field in the receive configuration ram (section 9.2.5 ). large buffers are best used for data-intensive, time-insensitive packets like graphics files, whereas small buffers are best used for time-sensitive information like real-time voice. table 9-b. receive dma main operational areas descriptors function section packet a dedicated area of memory that describes the location and attributes of the packet data. 9.2.2 free queue a dedicated area of memory that the host writes to inform the dma where to store incoming packet data. 9.2.3 done queue a dedicated area of memory that the dma writes to inform the host that the packet data is ready for processing. 9.2.4 the done-queue descriptors contain information that the dma wishes to pass to the host. through the done-queue descriptors, the dma informs the host about the incoming packet data and where to find the packet descriptors that it has written into main memory. each completed descriptor contains the starting address of the data buffer wher e the packet data is stored. if enabled, the dma can burst read the free-que ue descriptors and burst write the done-queue descriptors. this helps minimize pci bus accesses, freeing the pci bus up to do more time critical functions. see sections 9.2.3 and 9.2.4 for more details about this feature. receive dma actions a typical scenario for the receive dma is as follows: 1) the receive dma gets a request from the receive fifo that it has packet data that needs to be sent to the pci bus. 2) the receive dma determines whether the incoming packet data should be stored in a large buffer or a small buffer. 3) the receive dma then reads a free-queue descriptor (either by reading a single descriptor or a burst of descriptors), indicating where, in main memory, there exists some free data buffer space and where the associated free packet descriptor resides. 4) the receive dma starts storing packet data in the previously free buffer data space by writing it out through the pci bus. 5) when the receive dma realizes that the current data buffer is filled (by knowing the buffer size it can calculate this), it then reads another free-que ue descriptor to find another free data buffer and packet descriptor location. 6) the receive dma then writes the previous packet descriptor and creates a linked list by placing the current descriptor in the next de scriptor pointer field; it then st arts filling the new buffer location. figure 9-1 provides an example of packet descriptor s being link listed together (see channel 2). 7) this continues until the entire packet data is stored. 8) the receive dma either waits until a packet has been completely received or until a programmable number (from 1 to 7) of data buffers have been filled before writing the done-queue descriptor, which indicates to the host that packet data is ready for processing.
DS31256 256-channel, high-thro ughput hdlc controller 87 of 182 host actions the host typically handles the receive dma as follows: 1) the host is always trying to make free data buffer space available and therefore tries to fill the free- queue descriptor. 2) the host either polls, or is in terrupted, when some incoming packet data is ready for processing. 3) the host then reads the done-queue descriptor ci rcular queue to find out which channel has data available, what the status is, and where the receive packet descriptor is located. 4) the host then reads the receive packet descriptor and begins processing the data. 5) the host then reads the next descriptor pointer in the link-listed chain a nd continues this process until either a number (from 1 to 7) of descriptors have been processed or an end of packet has been reached. 6) the host then checks the done-queue descriptor circ ular queue to see if any more data buffers are ready for processing.
DS31256 256-channel, high-thro ughput hdlc controller 88 of 182 figure 9-1. receive dma operation free data buffer address 00h 08h 10h free queue descriptors (circular queue) 00h 04h 08h done queue descriptors (circular queue) open descriptor space a vailable for use by the dma data buffer address unused timestamp ch #2 status 0ch free data buffer (up to 8188 bytes) free data buffer (up to 8188 bytes) first filled data buffer for channel 2 free packet descriptors & data buffers used packet descriptors & data buffers single filled data buffer for channel 5 second filled data buffer for channel 2 last filled data buffer for channel 2 single filled data buffer for channel 9 dmarbd unused free desc. ptr. free desc. ptr. free desc. ptr. unused unused free data buffer address free data buffer address open descriptor space a vailable for use by the dma # bytes next desc. ptr. data buffer address timestamp ch #5 status # bytes next desc. ptr. data buffer address timestamp ch #2 status # bytes next desc. ptr. data buffer address timestamp ch #2 status # bytes next desc. ptr. data buffer address timestamp ch #9 status # bytes next desc. ptr. eof status ch #5 desc. ptr. eof status ch #2 desc. ptr. eof status ch #9 desc. ptr. eof status ch # desc. ptr.
DS31256 256-channel, high-thro ughput hdlc controller 89 of 182 figure 9-2. receive dm a memory organization free data buffer space receive free-queue descriptors: contains 32-bit addresses for free data buffers and their associated free packet descriptors free-queue base address (32) free-queue end address (16) free-queue small buffer start address (16) free-queue large buffer host write pointer (16) free-queue large buffer dma read pointer (16) free-queue small buffer dma read pointer (16) free-queue small buffer host write pointer (16) up to 64k dual dwords free-queue descriptors allowed receive done-queue descriptors: contains index pointers to used packet descriptors done-queue base address (32) done-queue end address (16) done-queue dma write pointer (16) done-queue host read pointer (16) up to 64k dwords done-queue descriptors allowed receive packet descriptors: contains 32-bit addresses to free buffer as well as status/control information and links to other packet descriptors descriptor base address (32) up to 64k quad dwords descriptors allowed used data buffer space main off-board memory (32-bit address space) internal cheateau registers
DS31256 256-channel, high-thro ughput hdlc controller 90 of 182 9.2.2 packet descriptors a contiguous section of up to 65,536 quad dwords that ma ke up the receive packet descriptors resides in main memory. the receive packet descriptors are aligned on a quad dword basis and can be placed anywhere in the 32-bit address space throug h the receive descriptor base address ( table 9-c ). a data buffer is associated with each descriptor. the data buffer can be up to 8188 bytes long and must be a contiguous section of main memory. the host can set two different data buffer sizes through the receive large buffer size (rlbs) and the receive small buffer size (rsbs) registers (section 9.2.1 ). if an incoming packet requires more space than the data buffer allows, packet de scriptors are link-listed together by the dma to provide a chain of data buffers. figure 9-3 shows an example of how three descriptors were linked together for an incoming packet on hdlc channel 2. figure 9-2 shows a similar example. channel 9 only required a si ngle data buffer and therefore only one packet descriptor was used. packet descriptors can be either free (available for use by the dma) or used (currently contain data that needs to be processed by the host). the free-queue de scriptors point to the free- packet descriptors. the done-queue descriptors point to the used-packet descriptors. table 9-c. receive d escriptor address storage register name address receive descriptor base address 0 (lower word) rdba0 0750h receive descriptor base address 1 (upper word) rdba1 0754h figure 9-3. receive descriptor example free descripto r base + 00h channel 2 first buffer descripto r base + 10h base + 20h free descripto r base + 30h free descripto r base + 40h base + 50h free descripto r base + 60h base + 70h free descripto r base + 80h free descripto r base + fffd0h free descripto r base + ffff0h channel 9 single buffer descripto r channel 2 second buffer descripto r channel 2 last buffer descripto r free-queue descriptor address done-queue descriptor pointe r maximum of 65,536 descriptors
DS31256 256-channel, high-thro ughput hdlc controller 91 of 182 figure 9-4. receive packet descriptors dword 0 data buffer address (32) dword 1 bufs (3) byte count (13) next descriptor pointer (16) dword 2 timestamp (24) hdlc channel (8) dword 3 unused (32) note: t he organization of the receive descriptor is not affected by the enabling of big endian. dword 0; bits 0 to 31/data buffer address. direct 32-bit starting address of the data buffer that is associated with this receive descriptor. dword 1; bits 0 to 15/next descriptor pointer. this 16-bit value is the offset from the receive descriptor base address of the next descriptor in the chain. only valid if buffer status = 001 or 010. note: this is an index, not absolute address. dword 1; bits 16 to 28/byte count. number of bytes stored in the data buffer. maximum is 8188 bytes (0000h = 0 bytes / 1ffch = 8188 bytes). dword 1; bits 29 to 31/buffer status. must be one of the three states listed below. 001 = first buffer of a multiple buffer packet 010 = middle buffer of a multiple buffer packet 100 = last buffer of a multiple or single buffer packet (equivalent to eof) dword 2; bits 0 to 7/hdlc channel number. hdlc channel number, which can be from 1 to 256. 00000000 (00h) = hdlc channel number 1 11111111 (ffh) = hdlc channel number 256 dword 2; bits 8 to 31/timestamp. when each descriptor is written into memory by the dma, this 24-bit timestamp is provided to keep track of packet arrival times. the timestamp is based on the pclk frequency divided by 16. for a 33mhz pclk, the timestamp incremen ts every 485ns and rolls over every 8.13 seconds. for a 25mhz clock, the timestamp increments every 640ns and rolls over every 10.7 seconds. the host can calculate the difference in packets? arrival times by knowing the pclk frequency and then taking the difference in timestamp readings between consecutive packet descriptors. dword 3; bits 0 to 31/unused. not written to by the dma. can be used by the host. application note: dword 3 is used by the transmit dma and, in store and forward applications, the receive and transmit packet descriptors have been designed to eliminate the need for the host to groom the descriptors before transmission. in these type of applications, the host should not use dword 3 of the receive packet descriptor.
DS31256 256-channel, high-thro ughput hdlc controller 92 of 182 9.2.3 free queue the host writes the 32-bit addresses of the available (free) data buffers and their associated packet descriptors to the receive free queue. the descriptor space is indicated through a 16-bit pointer, which the dma uses along with the receive packet descriptor base address to find the exact 32-bit address of the associated receive packet descriptor. figure 9-5. receive fr ee-queue descriptor dword 0 free data buffer address (32) dword 1 unused (16) free packet descriptor pointer (16) note: the organization of the free queue is not affected by the enabling of big endian. dword 0; bits 0 to 31/data buffer address. direct 32-bit starting address of a free data buffer. dword 1; bits 0 to 15/free packet descriptor pointer. this 16-bit value is the offset from the receive descriptor base address of the free descriptor space associated with the free data buffer in dword 0. note: this is an index, not an absolute address. dword 1; bits 16 to 31/unused. not used by the dma. can be set to any value by the host and is ignored by the receive dma. the receive dma reads from the receive free-queue de scriptor circular queue which data buffers and their associated descriptors are available for use by the dma. the receive free-queue descriptor is actually a set of two circular queues ( figure 9-6 ). there is one circular queue that indicates where free large buffers and their associated free descriptors exist. there is another circular queue that indicates where free small buffers and their associated free descriptors exist. large and small buffer size handling through the receive configuration-ram buffer-size field, the dma knows for a particular hdlc channel whether the incoming packets should be stored in the large or the small free data buffers. the host informs the dma of the size of both the large a nd small buffers through the receive large and small buffer size (rlbs/rsbs) registers. for example, when the dma knows that data is ready to be written onto the pci bus, it checks to see if the data is to be sent to a large buffer or a small buffer, and then it goes to the appropriate free-queue descriptor and pulls the next available free buffer address and free descriptor pointer. if the host wishes to have onl y one buffer size, then the receive free queue small- buffer start address is set equal to the receive free-que ue end address. in the receive configuration ram, none of the active hdlc channels are configured for the small buffer size. there are a set of internal addresses within the device to keep track of the addresses of the dual circular queues in the receive free queue. these are accessed by the host and the dma. on initialization, the host configures all the registers shown in table 9-e . after initialization, the dm a only writes to (changes) the read pointers and the host only writes to the write pointers.
DS31256 256-channel, high-thro ughput hdlc controller 93 of 182 empty case the receive free queue is considered empty when the read and write pointers are identical. receive free-queue empty state empty descriptor empty descriptor empty descriptor read pointer > empty descriptor < write pointer empty descriptor empty descriptor empty descriptor full case the receive free queue is considered full when the read pointer is ahead of the write pointer by one descriptor. therefore, one descript or must always remain empty. receive free-queue full state valid descriptor valid descriptor empty descriptor < write pointer read pointer > valid descriptor valid descriptor valid descriptor valid descriptor table 9-d describes how to calculate the absolute 32-bit address of the read a nd write pointers for the receive free queue. table 9-d. receive free-queue read /write pointer absolute address calculation buffer algorithm absolute address = free queue base + write pointer x 8 large absolute address = free queue base + read pointer x 8 absolute address = free queue base + small buffer start x 8 + write pointer x 8 small absolute address = free queue base + small buffer start x 8 + read pointer x 8 table 9-e. receive free-queu e internal address storage register name address receive free-queue base address 0 (lower word) rfqba0 0700h receive free-queue base address 1 (upper word) rfqba1 0704h receive free-queue large buffer host write pointer rfqlbwp 0710h receive free-queue large buffer dma read pointer rfqlbrp 0718h receive free-queue small buffer start address rfqsbsa 070ch receive free-queue small buffer host write pointer rfqsbwp 0714h receive free-queue small buffer dma read pointer rfqsbrp 071ch receive free-queue end address rfqea 0708h note: both rfqsbsa and rfqea are not absolute addresses, i.e., the absolute end address is ?base + rfqea x 8.?
DS31256 256-channel, high-thro ughput hdlc controller 94 of 182 figure 9-6. receive fr ee-queue structure once the receive dma is activated (by setting the rde control bit in the master configuration register, see section 5 ), it can begin reading data out of the free queue. it knows where to read data out of the free queue by reading the read pointer and adding it to th e base address to obtain the actual 32-bit address. once the dma has read the free queue, it increments the read pointer by two dwords. a check must be made to ensure the incremented address does not equal or exceed either the receive free-queue small- buffer start address (in the case of the large buffer circular queue) or the receive free-queue end address (in the case of the small buffer circular queue). if the incremented address does equal or exceed either of these addresses, the incremented read pointer is set equal to 0000h. base + 00h base + 08h base + 10h base + 18h base + 20h base + end address free-queue large buffer host write pointer free-queue large buffer dma read pointer maximum of 65,536 free-queue descriptors dma acquired free-queue descriptor free-queue small buffer dma read pointer free-queue small buffe r host write pointe r free-queue small buffer start address large buffe r circula r queue small buffe r circula r queue host readied free-queue descriptor dma acquired free-queue descriptor dma acquired free-queue descriptor dma acquired free-queue descriptor dma acquired free-queue descriptor dma acquired free-queue descriptor host readied free-queue descriptor host readied free-queue descriptor host readied free-queue descriptor host readied free queue descriptor host readied free-queue descriptor host readied free-queue descriptor
DS31256 256-channel, high-thro ughput hdlc controller 95 of 182 status/interrupts on each read of the free queue by the dma, the dm a sets either the status bit for receive dma large buffer read (rlbr) or the status bit for receive dma small buffer read (rsbr) in the status register for dma (sdma). the dma also checks the receive fr ee-queue large-buffer host write pointer and the receive free-queue small-buffer host wr ite pointer to ensure that an underflow does not occur. if it does occur, the dma sets either the status bit for receive dma large buffer read error (rlbre) or the status bit for receive dma small buffer read error (rsbre) in the status register for dma (sdma), and it does not read the free queue nor does it increment the read pointer. in such a scenario, the receive fifo can overflow if the host does not provide free-queue desc riptors. each of the status bits can also (if enabled) cause a hardware interrupt to occur. see section 5 for more details. free-queue burst reading the dma can read the free queue in bursts, which a llows for a more efficient use of the pci bus. the dma can grab messages from the free queue in groups rather than one at a time, freeing up the pci bus for more time-critical functions. an internal fifo stores up to 16 free-queue descri ptors (32 dwords, as each descriptor occupies two dwords). the free queue can either opeate in dual or si ngular circular queue mode. it can be divided into large buffer and small buffer. the lbsa (large buffer starting address) and the lbea (large buffer ending address) form the large buffer queue, and the sbsa (small buffer starting address) and the rfqea (receive free-queue end address) form the small buffer queue. when the sbsa is not equal to and greater than the rfqea, the free queue is set up in a dual circular mode. if the sbsa is equal to the frqea, the free queue is operating in a single queue mode. when the free queue is operated as a dual circular queue supporting both large and small buffers, th en the fifo is cut into two 8-message fifos. if the free queue is operated as a single circular queu supporting only the large buffers, then the fifo is set up as a single 16-descriptor fifo. the host must configure the free-queue fifo for proper operation through the receive dma queues control (rdmaq) register (see the following). when enabled through the receive free-queue fifo-enable (rfqfe) bit, the free-queue fifo does not read the free queue until it reaches the low watermark. when the fifo reaches the low watermark (which is two descriptors in the dual mode or four de scriptors in the single mode), it attempts to fill the fifo with additional descriptors by burst reading the free queue. before it reads the free queue, it checks (by examining the receive free-queue host write poi nter) to ensure the free queue contains enough descriptors to fill the free-queue fifo. if the free queue does not have enoug h descriptors to fill the fifo, it only reads enough to keep from underflowing the free queue. if the fifo detects that there are no free-queue descriptors available for it to read, then it sets either the status bit for the receive dma large buffer read error (rlbre) or the status bit for the receive dma small buffer read error (rsbre) in the status register for dma (sdma); it does not read the free queue nor does it increment the read pointer. in such a scenario, the receive fifo ca n overflow if the host does not provide free-queue descriptors. if the free-queue fifo can read de scriptors from the free queue, it burst reads them, increments the read pointer, and sets either the stat us bit for receive dma large buffer read (rlbr) or the status bit for the receive dma small buffer read (rsbr) in the status register for dma (sdma). see section 5 for more details on status bits.
DS31256 256-channel, high-thro ughput hdlc controller 96 of 182 register name: rdmaq register description: receive dma queues control register address: 0780h bit # 7 6 5 4 3 2 1 0 name n/a n/a rdqf rdqfe rfqsf rfqlf n/a rfqfe default 0 0 0 0 0 0 0 0 bit # 15 14 13 12 11 10 9 8 name n/a n/a n/a n/a n/a rdqt2 rdqt1 rdqt0 default 0 0 0 0 0 0 0 0 note: bits that are underlined are read-only; all other bits are read-write. bit 0/receive free-queue fifo enable (rfqfe). to enable the dma to burst read descriptors from the free queue, this bit must be set to 1. if this bit is set to 0, descriptors are read one at a time. 0 = free-queue burst read disabled 1 = free-queue burst read enabled bit 2/receive free-queue large buffer fifo flush (rfqlf). when this bit is set to 1, the internal large buffer free-queue fifo is flushed (currently loaded free-queue descriptors are lost). this bit must be set to 0 for proper operation. 0 = fifo in normal operation 1 = fifo is flushed bit 3/receive free-queue small buffer fifo flush (rfqsf). when this bit is set to 1, the internal small buffer free-queue fifo is flushed (currently loaded free-queue descriptors are lost). this bit must be set to 0 for proper operation. 0 = fifo in normal operation 1 = fifo is flushed bit 4/receive done-queue fifo enable (rdqfe). see section 9.2.4 for details. bit 5/receive done-queue fifo flush (rdqf). see section 9.2.4 for details. bits 8 to 10/receive done-queue status bit threshold setting (rdqt0 to rdqt2). see section 9.2.4 for details.
DS31256 256-channel, high-thro ughput hdlc controller 97 of 182 9.2.4 done queue the dma writes to the receive done queue when it has filled a free data buffer with packet data and has loaded the associated packet descriptor with all the necessary information. the descriptor location is indicated through a 16-bit pointer that the host uses w ith the receive descriptor base address to find the exact 32-bit address of the asso ciated receive descriptor. figure 9-7. receive done-queue descriptor dword 0 v eof status(3) bufcnt(3) hdlc channel (8) descriptor pointer (16) note 1: the organization of the done queue is not affected by the enabling of big endian. note 2: descriptor pointer is an index, not an absolute address. dword 0; bits 0 to 15/descriptor pointer. this 16-bit value is the offset from the receive descriptor base address of a receive packet descriptor that has been readied by the dma and is available for the host to begin processing. note: this is an index, not an absolute address. dword 0; bits 16 to 23/hdlc channel number. this is an hdlc channel number, which can be from 1 to 256. 00000000 (00h) = hdlc channel number 1 11111111 (ffh) = hdlc channel number 256 dword 0; bits 24 to 26/buffer count (bufcnt). if an hdlc channel has been configured to only write to the done queue after a packet has been completely received (i.e., the threshold field in the receive dma configuration ram is set to 000), then bufcnt is always set to 000. if the hdlc channel has been configured through the threshold field to write to the done queue after a programmable number of buffers (from 1 to 7) has been filled, then bufcnt corresponds to the number of buffers that have been written to host memory. the bufcnt is less than the threshold fi eld value when the incoming packet does not require the number of buffers specified in the threshold field. 000 = indicates that a complete packet has been received (only used when threshold = 000) 001 = 1 buffer has been filled 010 = 2 buffers have been filled 111 = 7 buffers have been filled dword 0; bits 27 to 29/packet status. these three bits report the final status of an incoming packet. they are only valid when the eof bit is set to 1 (eof = 1). 000 = no error, valid packet received 001 = receive fifo overflow (remainder of the packet discarded) 010 = crc checksum error 011 = hdlc frame abort sequence detected (remainder of the packet discarded) 100 = nonaligned byte count error (not an integral number of bytes) 101 = long frame abort (max packet length exceeded; remainder of the packet discarded) 110 = pci abort (remainder of the packet discarded) 111 = reserved state (never occurs in normal device operation) dword 0; bit 30/end of frame (eof). this bit is set to 1 when this receive descriptor is the last one in the current descriptor chain. this indicates that a packet has been fully received or an error has been detected, which has caused a premature termination. dword 0; bit 31/valid done-queue descriptor (v). this bit is set to 0 by the receive dma. instead of reading the receive done-queue read pointer to locate completed done-queue descriptors, the host can use this bit, since the dma sets the bit to 0 when it is written in to the queue. if the latter scheme is used, the host must set this bit to 1 when the done queue descriptor is read.
DS31256 256-channel, high-thro ughput hdlc controller 98 of 182 the host reads from the receive done queue to find whic h data buffers and their associated descriptors are ready for processing. the receive done queue is circular. a set of internal addresses within the device that are accessed by the host and the dma keep track of the queue?s addresses. on initialization, the host configures all the registers, as shown in table 9-f . after initialization, the dma only write s to (changes) the write pointer and the host only writes to the read pointer. empty case the receive done queue is considered empty wh en the read and write pointers are identical. receive done-queue empty state empty descriptor empty descriptor empty descriptor read pointer > empty descriptor < write pointer empty descriptor empty descriptor empty descriptor full case the receive done queue is considered full when the r ead pointer is ahead of the write pointer by one descriptor. therefore, one descript or must always remain empty. receive done-queue full state valid descriptor valid descriptor empty descriptor < write pointer read pointer > valid descriptor valid descriptor valid descriptor valid descriptor table 9-f. receive done-que ue internal address storage register name address receive done-queue base address 0 (lower word) rdqba0 0730h receive done-queue base address 1 (upper word) rdqba1 0734h receive done-queue dma write pointer rdqwp 0740h receive done-queue host read pointer rdqrp 073ch receive done-queue end address rdqea 0738h receive done-queue fifo flush timer rdqfft 0744h note: receive done-queue end address is not an absolute address. the absolute end address is ?base + rdqea x 4.?
DS31256 256-channel, high-thro ughput hdlc controller 99 of 182 figure 9-8. receive d one-queue structure once the receive dma is activated (through the rde control bit in the master configuration register, see section 5 ), it can begin writing data to the done queue. it knows where to write data into the done queue by reading the write pointer and adding it to the ba se address to obtain the actual 32-bit address. once the dma has written to the done queue , it increments the write pointer by one dword. a check must be made to ensure the incremented address does not ex ceed the receive done-queue end address. if the incremented address exceeds this a ddress, the incremented write point er is set equal to 0000h (i.e., the base address). status bits/interrupts on writes to the done queue by the dma, the dma se ts the status bit for the receive dma done-queue write (rdqw) in the sdma. the host can configure the dma to either set this status bit on each write to the done queue or only after multiple (from 2 to 128) writes. the host controls this by setting the rdqt0 to rdqt2 bits in the receive dma queues c ontrol (rdmaq) register. see the description of the rdmaq register at the end of section 9.2.4 for more details. the dma also checks the receive done-queue host read pointer to ensure an overflow does not occur. if this does occur, the dma then sets the status bit for the receive dma done-queue write error (rdqwe) in the status register for dma (sdma), and it does not write to the done queue nor does it increment the write pointer. in such a scenario, packets can be lost and unrecoverable. each of the status bits can also (if enabled) cause a hardware interrupt to occur. see section 5 for more details. buffer write threshold setting in the dma configuration ram (section 9.2.5 ), there is a host-controlled field called ?threshold? (bits rdt0 to rdt2) that informs the dma when it shoul d write to the done queue. the host has the option to have the dma place information in the done queu e after a programmable number (from 1 to 7) data base + 00h base + 04h base + 08h base + 0ch base + 10h base + 14h base + end address done-queue dma write pointe r done-queue host read pointe r maximum of 65,536 done-queue descriptors dma readied done-queue descripto r dma readied done-queue descripto r dma readied done-queue descripto r dma readied done-queue descripto r host processed done-queue descripto r host processed done-queue descripto r host processed done-queue descripto r
DS31256 256-channel, high-thro ughput hdlc controller 100 of 182 buffers have been filled or wait until the completed packet data has been written. the dma always writes to the done queue when it has finished receiving a packet, even if the threshold has not been met. done-queue bu rst writing the dma can write to the done queue in bursts, which allows for a more efficient use of the pci bus. the dma can hand off descriptors to the done queue in groups rather than one at a time, freeing up the pci bus for more time-critical functions. an internal fifo stores up to eight done-queue desc riptors (8 dwords as each descriptor occupies one dword). the host must configure the fifo for prope r operation through the receive dma queues-control (rdmaq) register (see the following). when enabled through the receive done-queue fifo-e nable (rdqfe) bit, the done-queue fifo does not write to the done queue until it reaches the high wate rmark. when the done-queue fifo reaches the high watermark (which is six descriptors), it attempts to empty the done-queue fifo by burst writing to the done queue. before it writes to the done queue, it checks (by examining the receive done-queue host read pointer) to ensure the done queue has enough room to empty the done-queue fifo. if the done queue does not have enough room, then it only burst writes enough descriptors to keep from overflowing the done queue. if the fifo detects that there is no room for any descriptors to be written, it sets the status bit for the receive dma done-queue write error (rdqw e) in the status register for dma (sdma). it does not write to the done queue nor does it increment the write pointer. in such a scenario, packets can be lost and unrecoverable. if the done-queue fifo can write descriptors to the done queue, it burst writes them, increments the write pointer, and sets the status bit for the receive dma done-queue write (rdqw) in the status register for dma (sdma). see section 5 for more details on status bits. done-queue fifo flush timer to ensure the done-queue fifo gets flushed to th e done queue on a regular basis, the dma uses the receive done-queue fifo flush timer (rdqfft) to determine the maximum wa it time between writes. the rdqfft is a 16-bit programmable counter that is decremented every pclk divided by 256. it is only monitored by the dma when the receive done- queue fifo is enabled (rdqfe = 1). for a 33mhz pclk, the timer is decremented every 7.76  s. for a 25mhz clock, it is decremented every 10.24s. each time the dma writes to the done queue it resets the timer to the count placed into it by the host. on initialization, the host sets a value into the rdqfft that indicates the maximum time the dma should wait in between writes to the done queue. for example, with a pclk of 33mhz, the range of wait times is from 7.8  s (rdqfft = 0001h) to 508ms (rdqfft = ffffh). with a pclk of 25mhz, the wait times range from 10.2  s (rdqfft = 0001h) to 671ms (rdqfft = ffffh).
DS31256 256-channel, high-thro ughput hdlc controller 101 of 182 register name: rdqfft register description: receive done-queue fifo flush timer register address: 0744h bit # 7 6 5 4 3 2 1 0 name tc7 tc6 tc5 tc4 tc3 tc2 tc1 tc0 default 0 0 0 0 0 0 0 0 bit # 15 14 13 12 11 10 9 8 name tc15 tc14 tc13 tc12 tc11 tc10 tc9 tc8 default 0 0 0 0 0 0 0 0 note: bits that are underlined are read-only, all other bits are read-write. bits 0 to 15/receive done-queue fifo flush timer control bits (tc0 to tc15). please note that on system reset, the timer is set to 0000h, which is defined as an illegal setting. if the receive done-queue fifo is to be activated (rdqfe = 1), then the host must first configure th e timer to a proper state and then set the rdqfe bit to one. 0000h = illegal setting 0001h = timer count resets to 1 ffffh = timer count resets to 65,536 register name: rdmaq register description: receive dma queues control register address: 0780h bit # 7 6 5 4 3 2 1 0 name n/a n/a rdqf rdqfe rfqsf rfqlf n/a rfqfe default 0 0 0 0 0 0 0 0 bit # 15 14 13 12 11 10 9 8 name n/a n/a n/a n/a n/a rdqt2 rdqt1 rdqt0 default 0 0 0 0 0 0 0 0 note: bits that are underlined are read-only, all other bits are read-write. bit 0/receive free-queue fifo enable (rfqfe). see section 9.2.3 for details. bit 2/receive free-queue large buffer fifo flush (rfqlf). see section 9.2.3 for details. bit 3/receive free-queue small buffer fifo flush (rfqsf). see section 9.2.3 for details. bit 4/receive done-queue fifo enable (rdqfe). to enable the dma to burst write descriptors to the done queue, this bit must be set to 1. if this bit is set to 0, messages are written one at a time. 0 = done-queue burst-write disabled 1 = done-queue burst-write enabled bit 5/receive done-queue fifo flush (rdqf). when this bit is set to 1, the internal done-queue fifo is flushed by sending all data into the done queue. this bit must be set to 0 for proper operation. 0 = fifo in normal operation 1 = fifo is flushed
DS31256 256-channel, high-thro ughput hdlc controller 102 of 182 bits 8 to 10/receive done-queue status-bit threshold setting (rdqt0 to rdqt2). these bits determine when the dma sets the receive dma done-queue write (rdqw) status bit in the status register for dma (sdma) register. 000 = set the rdqw status bit after each descriptor write to the done queue 001 = set the rdqw status bit after 2 or more descriptors are written to the done queue 010 = set the rdqw status bit after 4 or more descriptors are written to the done queue 011 = set the rdqw status bit after 8 or more descriptors are written to the done queue 100 = set the rdqw status bit after 16 or more descriptors are written to the done queue 101 = set the rdqw status bit after 32 or more descriptors are written to the done queue 110 = set the rdqw status bit after 64 or more descriptors are written to the done queue 111 = set the rdqw status bit after 128 or more descriptors are written to the done queue 9.2.5 dma channel configuration ram there is a set of 768 dwords (3 dwords per channe l times 256 channels) on-board the device that the host uses to configure the dma. it uses the dma to stor e values locally when it is processing a packet. most of the fields within the dma configuration ram are for dma use and the host never writes to these fields. the host is only allowed to write (configure) to the lower word of dword 2 for each hdlc channel. the host-configurable fields are denoted with a thick box as shown below. figure 9-9. receive dm a configuration ram msb 31 lsb 0 receive dma configuration ram 000h 004h 008h hdlc channel 1 00ch 010h 014h hdlc channel 2 bf4h bf8h bfch hdlc channel 256 fields shown within the thick box are written by the host; all other fields are for usage by the dma and can only be read by the host current descriptor pointer (16) start descriptor pointer (16) byte count (13) threshold count (3) threshold(3 unused (4) ch en size (2) current descriptor pointer (16) current packet data buffer address (32) start descriptor pointer (16) byte count (13) threshold count (3) threshold(3) unused ( 4 ) ch en size (2) current descriptor pointer (16) start descriptor pointer (16) byte count (13) threshold count (3) threshold(3 unused (4) ch en size (2) current packet data buffer address (32) current packet data buffer address (32) unused (5) fbf unused (5) fbf unused (5) fbf
DS31256 256-channel, high-thro ughput hdlc controller 103 of 182 - for dma use only/host can only read this field - dword 0; bits 0 to 31/current data buffer address. the current 32-bit address of the data buffer that is being used. this address is used by the dma to track where data should be written to as it comes in from the receive fifo. - for dma use only/host can only read this field - dword 1; bits 0 to 15/current descriptor pointer. this 16-bit value is the offset from the receive descriptor base address of the current receive descriptor being used by the dma to describe the specifics of the data stored in the associated data buffer. - for dma use only/host can only read this field - dword 1; bits 16 to 31/starting descriptor pointer. this 16-bit value is the offset from the receive descriptor base address of the first receive descriptor in a link-list chain of descriptors. this pointer is written into the done queue by the dma after a specified number of data buffers (see the threshold value below) have been filled. - host must configure - dword 2; bit 0/channel enable (chen). this bit is controlled by the host to enable and disable an hdlc channel. 0 = hdlc channel disabled 1 = hdlc channel enabled - host must configure - dword 2; bits 1, 2/buffer size select. these bits are controlled by the host to select the manner in which the receive dma stores incoming packet data. 00 = use large size data buffers only 01 = use small size data buffers only 10 = fill a small buffer first, followed then by large buffers as needed 11 = illegal state and should not be selected - for dma use only/host can only read this field - dword 2; bits 3 to 6/dma reserved. these could be any value when read. they should be set to 0 when the host writes to it. - host must configure - dword 2; bits 7 to 9/threshold. these bits are controlled by the host to determine when the dma should write into the done queue that data is available for processing. they cannot be set to 000 when in transparent mode (rtrans = 1). 000 = dma should write to the done queue only after packet reception is complete 001 = dma should write to the done queue after 1 data buffer has been filled 010 = dma should write to the done queue after 2 data buffers have been filled 011 = dma should write to the done queue after 3 data buffers have been filled 100 = dma should write to the done queue after 4 data buffers have been filled 101 = dma should write to the done queue after 5 data buffers have been filled 110 = dma should write to the done queue after 6 data buffers have been filled 111 = dma should write to the done queue after 7 data buffers have been filled - for dma use only/host can only read this field - dword 2; bits 10 to 14/dma reserved. these could be any value when read. they should be set to 0 when the host writes to it. - for dma use only/host can only read this field - dword 2; bit 15/first buffer fill (fbf). this bit is set to 1 by the receive dma when it is in the process of filling the first buffer of a packet. the dma uses this b it to determine when to switc h to large buffers when the buffer size-select field is set to 10.
DS31256 256-channel, high-thro ughput hdlc controller 104 of 182 - for dma use only/host can only read this field - dword 2; bits 16 to 28/byte count. the dma uses these 13 bits to keep track of the number of bytes stored in the data buffer. maximum is 8188 bytes (0000h = 0 bytes / 1ffch = 8188 bytes). - for dma use only/host can only read this field - dword 2; bits 29 to 31/threshold count. these bits keep track of the number of data buffers that have been filled so that the receive dma knows when, based on the host-controlled threshold, to write to the done queue. 000 = threshold count is 0 data buffers 001 = threshold count is 1 data buffer 010 = threshold count is 2 data buffers 011 = threshold count is 3 data buffers 100 = threshold count is 4 data buffers 101 = threshold count is 5 data buffers 110 = threshold count is 6 data buffers 111 = threshold count is 7 data buffers register name: rdmacis register description: receive dma channel configuration indirect select register address: 0770h bit # 7 6 5 4 3 2 1 0 name hcid7 hcid6 hcid5 hcid4 hcid3 hcid2 hcid1 hcid0 default 0 0 0 0 0 0 0 0 bit # 15 14 13 12 11 10 9 8 name iab iarw n/a n/a n/a rdcw2 rdcw1 rdcw0 default 0 0 0 0 0 0 0 0 note: bits that are underlined are read-only; all other bits are read-write. bits 0 to 7/hdlc channe l id (hcid0 to hcid7) 00000000 (00h) = hdlc channel number 1 11111111 (ffh) = hdlc channel number 256 bits 8 to 10/receive dma configuration ram word select bits 0 to 2 (rdcw0 to rdcw2) 000 = lower word of dword 0 001 = upper word of dword 0 010 = lower word of dword 1 011 = upper word of dword 1 100 = lower word of dword 2 (only word that the host can write to) 101 = upper word of dword 2 110 = illegal state 111 = illegal state bit 14/indirect access read/write (iarw). when the host wishes to read data from the internal receive dma configuration ram, this bit should be written to 1 by the host. this causes the device to begin obtaining the data from the channel location indicated by the hcid bits. during the read access, the iab bit is set to 1. once the data is ready to be read from the rdmac register, the iab bit is set to 0. when the host wishes to write data to the internal receive dma configuration ram, this bit should be written to 0 by the host. this causes the device to take the data that is currently present in the rdmac register and write it to the channel location indicated by the hcid bits. when the device has completed the write, the iab bit is set to 0. bit 15/indirect access busy (iab). when an indirect read or write access is in progress, this read-only bit is set to 1. during a read operation, this bit is set to 1 until the data is ready to be read. it is set to 0 when the data is
DS31256 256-channel, high-thro ughput hdlc controller 105 of 182 ready to be read. during a write operation, this bit is set to 1 while the write is taking place. it is set to 0 once the write operation has completed. register name: rdmac register description: receive dma channel configuration register address: 0774h bit # 7 6 5 4 3 2 1 0 name d7 d6 d5 d4 d3 d2 d1 d0 default bit # 15 14 13 12 11 10 9 8 name d15 d14 d13 d 12 d11 d10 d9 d8 default note: bits that are underlined are read-only, all other bits are read-write. bits 0 to 15/receive dma configuration ram data (d0 to d15). data that is written to or read from the receive dma configuration ram. 9.3 transmit side 9.3.1 overview the transmit dma uses a scatter-gather technique to read packet data from main memory. the host keeps track of and decides from where (and when) th e dma should grab the outgoing packet data. a set of descriptors that get handed b ack and forth between the host and the dma can tell the dma where to obtain the packet data, and the dma can tell the host when the data has been transmitted. the transmit dma operation has three main areas, as shown in figure 9-10 , figure 9-11 , and table 9-g . the host writes to the pending queue, informing the dm a which channels have packet data ready to be transmitted. associated with each pending-queue descriptor is a data buffer that contains the actual data payload of the hdlc packet. the data buffers can be between 1 and 8188 bytes in length (inclusive). if an outgoing packet requires more memory than a data buffer contains, the host can link the data buffers to handle packets of any size. the done-queue descriptors contain information that the dma wishes to pass to the host. the dma writes to the done queue when it has completed transmitting either a comple te packet or data buffer (see below for the discussion on the dma update to the done queue). through the done-queue descriptors, the dma informs the host about the status of the out going packet data. if an error occurs in the transmission, the done queue can be used by the hos t to recover the packet data that did not get transmitted and the host can then re-queue the packets for transmission. if enabled, the dma can burst read the pending-q ueue descriptors and bur st write the done-queue descriptors. this helps minimize pci bus accesses, freeing the pci bus up to do more time-critical functions. see sections 9.3.3 and 9.3.4 for more details on this feature.
DS31256 256-channel, high-thro ughput hdlc controller 106 of 182 table 9-g. transmit dma main operational areas descriptors function section packet a dedicated area of memory that describes the location and attributes of the packet data. 9.3.2 pending queue a dedicated area of memory that the host writes to inform the dma that packet data is queued and ready for transmission. 9.3.3 done queue a dedicated area of memory that the dma writes to inform the host that the packet data has been transmitted. 9.3.4 host linking of data buffers as previously mentioned, the data buffers are limited to a length of 8188 bytes. if an outgoing packet requires more memory space than the available data buffer contains, the host can link multiple data buffers together to handle a packet length of any si ze. the host does this through the end-of-frame (eof) bit in the packet descriptor. each data buffer has a one -to-one association with a packet descriptor. if the host wants to link multiple data buffers together, the eof bit is set to 0 in all but the last data buffer. figure 9-10 shows an example for hdlc channel 5 wh ere the host has linked three data buffers together. the transmit dma knows where to find the next data buffer when the eof bit is set to 0 through the next descriptor pointer field. host linking of packets (packet chaining) the host also has the option to link multiple packets together in a chain. through the chain valid (cv) bit in the packet descriptor, the host can inform the transmit dma that the next descriptor pointer field contains the descriptor of another hdlc packet that is ready for transmission. the transmit dma ignores the cv bit until it sees eof = 1, which indicates the end of a packet. if cv = 1 when eof = 1, this indicates to the transmit dma that it should use the next descriptor pointer field to find the next packet in the chain. figure 9-12 shows an example of packet chaining. each column represents a separate packet chain. in column 1, three data buffers have b een linked together by the host for packet #1, and the host has created a packet chain by setting cv = 1 in the last descriptor of packet #1. dma linking of packets (h orizontal link listing) the transmit dma also has the ability to link packets together. internally, the transmit dma can store up to two packet chains, but if the host places more packet chains into the pending queue, the transmit dma must begin linking these chains together externally. the transmit dma does this by writing to packet descriptors ( figure 9-12 ). if columns 1 and 2 were the only two packet chains queued for transmission, then the transmit dma would not need to link packet chains together, but as soon as column 3 was queued for transmission, the transmit dm a had to store the third chain externally because it had no more room internally. the transmit dma links the packet chain in the third column to the one in the second column by writing the first descriptor of the third chain in the next pending descriptor pointer field of the first de scriptor of the second column (it also se ts the pv bit to 1). as shown in the figure, this chaining was carried one step fa rther to link the fourth column to the third.
DS31256 256-channel, high-thro ughput hdlc controller 107 of 182 priority packets the host has the option to change the order in which packets are transmitted by the dma. if the host sets the priority packet (pri) bit in the pending-queue descriptor to 1, the transmit dma knows that this packet is a priority packet and should be transmitted ahead of all standard pack ets. the rules for packet transmission are as follows: 1) priority packets are transmitted as soon as the curre nt standard packet (not packet chain) finishes transmission. 2) all priority packets are transmitted before any more standard packets are transmitted. 3) priority packets are ordered on a first come, first served basis. figure 9-13 shows an example of a set of priority packets interrupting a set of standard packets. in the example, the first priority packet chain (shown in column 2) was read by the transmit dma from the pending queue while it was transmitting standard pack et #1. it waited until standard packet #1 was complete and then began sending the priority packets. while column 2 was being sent, the priority packet chains of columns 3 and 4 arrived in the pending queue, so the transmit dma linked column four to column three and then waited until all of the priority packets were transmitted before returning to the standard packet chain in column 1. note that the packet chain in column 1 was interrupted to transmit the priority packets. in other words, the transmit dma did not wait for the complete packet to finish transmitting, only the current packet.
DS31256 256-channel, high-thro ughput hdlc controller 108 of 182 figure 9-10. transmit dma operation 00h 08h done-queue descriptors (circular queue) 04h free desc. ptr. ch#5 status free desc. ptr. ch#1 status free desc. ptr. ch# status 00h pending-queue descriptors (circular queue) 04h free desc. ptr. ch#5 pri free desc. ptr. ch#1 pri data buffer address ch #1 eof last transmitted data buffe r for channel 1 # bytes next desc. ptr. next pend. desc. p v cv unused unused data buffer address ch #1 eof 2nd transmitted data buffe r for channel 1 # bytes next desc. ptr. next pend. desc. p v cv unused unused data buffer address ch #1 eof 1st transmitted data buffe r for channel 1 # bytes next desc. ptr. next pend. desc. p v cv unused unused data buffer address ch #5 eof 1st queued data buffe r for channel 5 # bytes next desc. ptr. next pend. desc. p v cv unused unused data buffer address ch #5 eof 2nd queued data buffe r for channel 5 # bytes next desc. ptr. next pend. desc. p v cv unused unused data buffer address ch #5 eof last queued data buffe r for channel 5 # bytes next desc. ptr. next pend. desc. p v cv unused unused data buffer address ch #1 eof queued data buffe r for channel 1 # bytes next desc. ptr. next pend. desc. p v cv unused unused open descriptor space a vailable for use by the hos t data buffer address ch #5 eof transmitted data buffe r for channel 5 # bytes next desc. ptr. next pend. desc. p v cv unused unused 08h 0ch free desc. ptr. ch# pri free desc. ptr. ch# pri open descriptor space a vailable for use by the hos t 0ch 14h 10h free desc. ptr. ch# status free desc. ptr. ch# status free desc. ptr. ch# status eof = 0 eof = 0 eof = 1 eof = 0 eof = 1 eof = 0 eof = 0 eof = 1
DS31256 256-channel, high-thro ughput hdlc controller 109 of 182 figure 9-11. transmit dma memory organization free data buffer space transmit pending-queue descriptors: contains index pointers to packet descriptors of queued data buffers that are ready to be transmitted up to 64k dwords free-queue descriptors allowed pending-queue base address (32) pending-queue end address (16) pending-queue host write pointer (16) pending-queue dma read pointer (16) done-queue base address (32) done-queue end address (16) done-queue dma write pointer (16) done-queue host read pointer (16) descriptor base address (32) used data buffer space main offboard memory (32-bit address space) internal chateau registers transmit done-queue descriptors: contains index pointers to packet descriptors of data buffers that have been transmitted up to 64k dwords done-queue descriptors allowed transmit packet descriptors: contains 32-bit addresses to data buffers as well as status/control information and links to other packet descriptors up to 64k quad dwords descriptors allowed
DS31256 256-channel, high-thro ughput hdlc controller 110 of 182 figure 9-12. transmit dma packet handling buffer 1 packet 1 1st descripto r (eof=0/cv=0) buffer 2 packet 1 2nd descripto r (eof=0/cv=0) buffer 3 packet 1 last descripto r (eof=1/cv=1) buffer 1 packet 2 last descripto r (eof=1/cv=0) buffer 1 packet 3 1st descripto r (eof=0/cv=0) buffer 2 packet 3 2nd descripto r (eof=0/cv=0) buffer 3 packet 3 last descripto r (eof=1/cv=1) buffer 1 packet 4 last descripto r (eof=1/cv=0) buffer 1 packet 5 last descripto r (eof=1/cv=0) buffer 1 packet 6 1st descripto r (eof=0/cv=0) buffer 2 packet 6 2nd descripto r (eof=0/cv=0) buffer 3 packet 6 last descripto r (eof=1/cv=0) pv=1 pv=1 next pending descriptor pointe r stored within the packet descripto r last pending descriptor pointe r next pending descriptor pointe r next descriptor pointe r start descriptor pointe r next pending descriptor pointe r stored within the packet descripto r transmit dma configuration ram packet chain column 1 packet chain column 2 packet chain column 3 packet chain column 4
DS31256 256-channel, high-thro ughput hdlc controller 111 of 182 figure 9-13. transmit dma priority packet handling buffer 1 packet 1 1st descriptor (eof=0/cv=0) buffer 2 packet 1 2nd descriptor (eof=0/cv=0) buffer 3 packet 1 last descriptor (eof=1/cv=1) buffer 1 packet 2 last descriptor (eof=1/cv=0) buffer 1 pri. packet 1 1st descriptor (eof=0/cv=0) buffer 2 pri. packet 1 last descriptor (eof=1/cv=1) buffer 1 pri. packet 2 last descriptor (eof=1/cv=0) buffer 1 pri. packet 3 last descriptor (eof=1/cv=0) buffer 1 pri. packet 4 1st descriptor (eof=0/cv=0) buffer 2 pri. packet 4 2nd descriptor (eof=0/cv=0) buffer 3 pri. packet 4 last descriptor (eof=1/cv=0) next descriptor pointer start descriptor pointer transmit dma configuration ram normal path if no priority packets had occurred service priority packets a ll priority packets have been serviced next pending descriptor pointer last pending descriptor pointer next pending descriptor pointer next descriptor pointer last pending descriptor pointer standard queue pointers priority queue pointers note 1: the start descriptor pointer field in the transmit dma configuration ram is used by both the normal and priority pending queues. see note 1 pv = 1 next pending descriptor pointer stored within the packet descriptor standard packet chain column 1 priority packet chain column 2 priority packet chain column 3 priority packet chain column 4
DS31256 256-channel, high-thro ughput hdlc controller 112 of 182 dma updates to the done queue the host has two options for when the transmit dm a should write descriptor s that have completed transmission to the done queue. on a channel-by-channel basis, throug h the done-queue select (dqs) bit in the transmit dma configuration ram, the host can condition the dma to: 1) write to the done queue only when the complete hdlc packet has been transmitted (dqs = 0). 2) write to the done queue when each da ta buffer has been transmitted (dqs = 1). the status field in the done-queue descriptor is configured based on the setting of the dqs bit. if dqs = 0, it is set to 000 when a packet has successfully completed transmission to the status field. if dqs = 1, it is set to 001 when the first data buffer has successfully completed transmission to the status field. the status field is set to 010 when each middle buffer (i.e., the second through the next to last) has successfully completed transmission. the status field is set to 011 when the last data buffer of a packet has successfully completed transmission. error conditions while processing packets for transmission, the dma can encounter a number of error conditions, which include the following:  pci error (an abort error)  transmit fifo underflow  channel is disabled (chen = 0) in the transmit dma configuration ram  channel number discrepancy between the pe nding queue and the packet descriptor  byte count of 0 bytes in the packet descriptor if any of these errors occur, the transmit dma automatically disables the affected channel by setting the channel enable (chen) bit in the transmit dma configuration ram to 0. then it writes the current descriptor into the done queue with the appropriate error status, as shown in table 9-h . table 9-h. done-queue error-status conditions packet status error description 100 software provisioning error; this channel was not enabled 101 descriptor error; either byte count = 0 or channel code inconsistent with pending queue 110 pci error; either parity or abort 111 transmit fifo error; it has underflowed since the transmit dma has disabled the channel, any remaining queued descriptors are not transmitted and are written to the done queue with a packet stat us of 100 (i.e., reporting that the channel was not enabled). at this point the host has two options. option 1: it can wait until all of the remaining queued descriptors are written to the done queue with an errored status, ma nually re-enable the channel by setting the chen bit to 1, and then re -queue all of the affected packet s. option 2: as soon as it detects an errored status, it can force the channel active again by setting the channel reset (chrst) bit to 1 for the next descriptor that it writes to the pending queue for the affected channel. as soon as the transmit dma detects that the chrst is set to 1, it re-enables the channel by forcing the chen bit to 1. the dma does not re-enable the channel until it has finished writing all of the previously queued descriptors to the done queue. then the host can collect the errore d descriptors as they arrive in the done queue and re-queue them for transmission by writing descriptors to the pending queue, so the transmit dma knows where to find the packets that did not get transmitted ( note: the host must set the next-pending
DS31256 256-channel, high-thro ughput hdlc controller 113 of 182 descriptor pointer and pv fields in the packet descriptor to 0 to ready them for transmission). the second option allows the software a clea ner error-recovery technique. see figure 9-14 for more details. figure 9-14. transmit dma error recovery algorithm host actions the host typically handles the transmit dma as follows: 1) the host places readied packets into the pending queue. 2) the host either polls (or is interrupted) that some outgoing packets have completed transmission and that it should read the done queue. 3) if done queue reports that an error was incurred and that a packet was not transmitted, the host must requeue the packet for transmission. transmit dma actions a typical scenario for the transmit dma is as follows: 1) the transmit dma constantly reads the pending queue looking for packets that are queued for transmission. 2) the transmit dma updates the done queue as pack ets or data buffers to complete transmission. 3) if an error occurs, the transmit dma disables the channel and waits for the host to request that the channel be enabled. read done queue status = 1xx? no data buffers and packet descriptor space available for reuse yes set chrst = 1 for the next descriptor written to the pending queue set the pv and the next pending descriptor pointer fields to 0 in the errored packet descripto r place the errored packet descriptor back into the pending queue for retransmission
DS31256 256-channel, high-thro ughput hdlc controller 114 of 182 9.3.2 packet descriptors a contiguous section of up to 65,536 quad dwords that ma ke up the transmit packet descriptors resides in main memory. the transmit packet descriptors are aligned on a quad-dword basis and can be placed anywhere in the 32-bit address space through the transmit descriptor base address ( table 9-i ). a data buffer is associated with each descriptor. the data buffer can be up to 8188 bytes long and must be a contiguous section of main memory. the host informs the dma of data buffers? actual sizes through the byte count field that resides in the packet descriptor. if an outgoing packet requires more space than the data buffer allows, then packet descriptors are link- listed together by the host to provide a chain of data buffers. figure 9-15 shows an example of how three descriptors were linked together for an incoming packet on hdlc channel 7. channel 3 only required a single data buffer and thus only one packet descriptor was used. figure 9-10 shows a similar example for channels 5 and 1. packet descriptors can be either pending (i.e., queued up by the host and ready for transmission by the dma) or completed (i.e., have been transmitted by the dma and are available for processing by the host). pending-packet descriptors are pointed to by the pending-queue descriptors and completed packet descriptors are pointed to by the done-queue descriptors. table 9-i. transmit d escriptor address storage register name address transmit descriptor base address 0 (lower word) tdba0 0850h transmit descriptor base address 1 (upper word) tdba1 0854h figure 9-15. transmit descriptor example ch 5 single sent buffer descripto r base + 00h ch 7 1st queued buffer descripto r base + 10h base + 20h ch 7 sent 1st buffer descripto r base + 30h free descripto r base + 40h base + 50h free descripto r base + 60h base + 70h ch 7 last sent buffer descripto r base + 80h free descripto r base + fffd0h free descripto r base + ffff0h ch 3 single queued buffer desc. ch 7 2nd queued buffer descripto r ch 7 last queued buffer descripto r pending-queue descriptor address done-queue descriptor pointe r maximum of 65,536 descriptors
DS31256 256-channel, high-thro ughput hdlc controller 115 of 182 figure 9-16. transmit packet descriptors dword 0 data buffer address (32) dword 1 eof cv unused byte count (13) next descriptor pointer (16) dword 2 unused (24) hdlc channel (8) dword 3 unused (15) pv next pending descriptor pointer (16) note 1: the organization of the transmit descriptor is not affected by the enabling of big endian. note 2: the format of the transmit descriptor is almost identical to the receive descriptor; this lessens the burden of the host in pr eparing descriptors in store-and-forward applications. note 3: next descriptor pointer is an index, not an absolute address. dword 0; bits 0 to 31/data buffer address. direct 32-bit starting address of the data buffer that is associated with this transmit descriptor. dword 1; bits 0 to 15/next descriptor pointer. this 16-bit value is the offset from the transmit descriptor base address of the next descriptor in the chain. only valid if eof = 0 (next descriptor in the same packet chain) or if eof = 1 and cv = 1 (first descriptor in the next packet). dword 1; bits 16 to 28/byte count. number of bytes stored in the data buffer. maximum is 8188 bytes (0000h = 0 bytes / 1ffch = 8188 bytes). dword 1; bit 29/unused. this bit is ignored by the transm it dma and can be set to any value. dword 1; bit 30/chain valid (cv). if cv is set to 1 when eof = 1, then this indicates that the next descriptor pointer field is valid and corresponds to the first descriptor of the next packet that is queued up for transmission. the cv bit is ignored when eof = 0. dword 1; bit 31/end of frame (eof). when set to 1, this bit indicates that the descriptor is the last buffer in the current packet. when set to 0, this bit indicates that next descriptor pointer field is valid and points to the next descriptor in the packet chain. dword 2; bits 0 to 7/hdlc channel number. hdlc channel number, which can be from 1 to 256. 00000000 (00h) = hdlc channel number 1 11111111 (ffh) = hdlc channel number 256 dword 2; bits 8 to 31/unused. these bits are ignored by the transmit dma and can be set to any value. dword 3; bits 0 to 15/next pending descriptor pointer. this 16-bit value is the offset from the transmit descriptor base address to another descriptor chain that is queued up for transmission. the transmit dma can store up to two queued packet chains internally, but additional pack et chains must be stored as a link list by the transmit dma using this field. this field is only valid if pv = 1, and it should be set to 0000h by the host when the host is preparing the descriptor. dword 3; bit 16/pending descriptor valid (pv). if set, this bit indicates that the next pending descriptor pointer field is valid and corresponds to the first descriptor of the next packet chain that is queued up for transmission. this field is written to by the transmit dma to link descript ors together and should always be set to 0 by the host. dword 3; bits 17 to 31/unused. these bits are ignored by the transmit dma and can be set to any value.
DS31256 256-channel, high-thro ughput hdlc controller 116 of 182 9.3.3 pending queue the host writes to the transmit pending queue the location of the readied descriptor, channel number, and control information. the descriptor space is indicated through a 16-b it pointer, which the dma uses with the transmit packet-descriptor base address to find the exact 32-bit address of the associated transmit packet descriptor. figure 9-17. transmit pending-queue descriptor dword 0 unused (3) status(3) chrst pri hdlc channel (8) descriptor pointer (16) note 1: the organization of the pending queue is not affected by the enabling of big endian. note 2: decriptor pointer is an index, not an absolute address. dword 0; bits 0 to 15/descriptor pointer. this 16-bit value is the offset from the transmit descriptor base address to the first descriptor in a packet chain (can be a single descriptor) that is queued up for transmission. dword 0; bits 16 to 23/hdlc channel number. hdlc channel number, which can be from 1 to 256. 00000000 (00h) = hdlc channel number 1 11111111 (ffh) = hdlc channel number 256 dword 0; bit 24/priority packet (pri). if this bit is set to 1, this indicates to the transmit dma that the packet or packet chain pointed to by the descriptor pointer field should be transmitted immediately after the current packet transmission (whether it be standard or priority) is complete. dword 0; bit 25/channel reset (chrst). under normal operating conditions, this bit should always be set to 0. when an error condition occurs and the transmit dma pla ces the channel into an out-of-service state by setting the channel enable (chen) bit in the transmit dma config uration register to 0, the host can force the channel active again by setting the chrst bit to 1. only the first de scriptor loaded into the pending queue after an error condition should have chrst set to 1; all subsequent descriptors (until another error condition occurs) should have chrst set to 0. the transmit dma examines this bit and forces the channel active (chen = 1) if chrst is set to 1. if chrst is set to 0, then the transmit dma doe s not modify the state of the chen bit. see section 9.2.2 for more details about how error conditions are handled. dword 0; bits 26 to 28/packet status. not used by the dma. can be set to any value by the host and is ignored by the transmit dma. this field is used by the transmit dma when it writes to the done queue to inform the host of the status of the outgoing packet data. dword 0; bits 29 to 31/unused. not used by the dma. can be set to any value by the host and is ignored by the transmit dma.
DS31256 256-channel, high-thro ughput hdlc controller 117 of 182 the transmit dma reads from the transmit pending-queue descriptor circular queue which data buffers and their associated descriptors are ready for transmission. a set of inte rnal addresses within the device that are accessed by both the host and the dma keep track of the circular queue addresses in the transmit pending queue. on initialization, the host conf igures all of the registers shown in table 9-j . after initialization, the dma only writes to (changes) the re ad pointers and the host only writes to the write pointers. empty case the transmit pending queue is considered empty when the read and write pointers are identical. transmit pending-queue empty state empty descriptor empty descriptor empty descriptor read pointer > empty descriptor < write pointer empty descriptor empty descriptor empty descriptor full case the transmit pending queue is considered full when the read pointer is ahead of the write pointer by one descriptor. therefore, one descript or must always remain empty. transmit pending- queue full state valid descriptor valid descriptor empty descriptor < write pointer read pointer > valid descriptor valid descriptor valid descriptor valid descriptor table 9-j. transmit pending-qu eue internal address storage register name address transmit pending-queue base address 0 (lower word) tpqba0 0800h transmit pending-queue base address 1 (upper word) tpqba1 0804h transmit pending-queue host write pointer tpqwp 080ch transmit pending-queue dma read pointer tpqrp 0810h transmit pending-queue end address tpqea 0808h note: transmit free-queue end address is not an absolute address. the absolute end address is ?base + tpqea.?
DS31256 256-channel, high-thro ughput hdlc controller 118 of 182 figure 9-18. transmit pending-queue structure once the transmit dma is activated (by setting the tde control bit in the master configuration register; see section 5 ), it can begin reading data out of the pending queue. it knows where to read the data by reading the read pointer and adding it to the base a ddress to obtain the actual 32-bit address. once the dma has read the pending queue, it increments the read pointer by one dword. a check must be made to ensure the incremented address does not exceed th e transmit pending-queue end address. if the incremented address does exceed th is address, the incremented r ead pointer is set equal to 0000h. status/interrupts on each read of the pending queue by the dma, the dma sets the status bit for transmit dma pending- queue read (tpqr) in the status register for dma (s dma). the status bits can also (if enabled) cause an hardware interrupt to occur. see section 5 for more details. pending-queue burst reading the dma can read the pending queue in bursts, which allows for a more efficient use of the pci bus. the dma can grab descriptors from the pending queue in groups rather than one at a time, freeing up the pci bus for more time-critical functions. an internal fifo can store up to 16 pending-queue descriptors (16 dwords, since each descriptor occupies one dword). the host must configure the pending-queue fifo for proper operation through the transmit dma queues-control (tdmaq) register (see the following). when enabled through the transmit pending-queue fifo-enable (tpqfe) bit, the pending-queue fifo does not read the pending queue until it is empty. when the pending queue is empty, it attempts to fill the fifo with additional descriptor s by burst reading the pending queue. before it reads the pending queue, it checks (by examining the transmit pending-queue host write pointer) to ensure the pending queue contains enough descriptors to fill the pending-queue fifo. if the pending queue does not have enough descriptors to fill the fifo, it only reads enoug h to empty the pending queue. if the fifo detects that there are no pending-queue descriptors available for it to read, it waits and tries again later. if the pending-queue fifo can read descriptors from the pending queue, it burst reads them, increments the base + 00h base + 04h base + 08h base + 0ch base + 10h base + 14h base + end address pending-queue host write pointe r pending-queue dma read pointe r maximum of 65,536 pending-queue descriptors dma acquired pending-queue descripto r host readied pending-queue descripto r host readied pending-queue descripto r host readied pending-queue descripto r dma acquired pending-queue descripto r dma acquired pending-queue descripto r host readied pending-queue descripto r
DS31256 256-channel, high-thro ughput hdlc controller 119 of 182 read pointer, and sets the status bit for transmit dma pending-queue read (tpqr) in the status register for dma (sdma). see section 5 for more details about status bits. register name: tdmaq register description: transmit dma queues control register address: 0880h bit # 7 6 5 4 3 2 1 0 name n/a n/a n/a n/a tdqf tdqfe tpqf tpqfe default 0 0 0 0 0 0 0 0 bit # 15 14 13 12 11 10 9 8 name n/a n/a n/a n/a n/a tdqt2 tdqt1 tdqt0 default 0 0 0 0 0 0 0 0 note: bits that are underlined are read-only; all other bits are read-write. bit 0/transmit pending-queue fifo enable (tpqfe). this bit must be set to 1 to enable the dma to burst read descriptors from the pending queue. if this bit is set to 0, descriptors are read one at a time. 0 = pending-queue burst read disabled 1 = pending-queue burst read enabled bit 1/transmit pending-queue fifo flush (tpqf). when this bit is set to 1, the internal pending-queue fifo is flushed (currently loaded pending-queue descriptors are lost). this bit must be set to 0 for proper operation. 0 = fifo in normal operation 1 = fifo is flushed bit 2/transmit done-queue fifo enable (tdqfe). see section 9.3.4 for details. bit 3/transmit done-queue fifo flush (tdqf). see section 9.3.4 for details. bits 8 to 10/transmit done-queue status bit threshold setting (tdqt0 to tdqt2). see section 9.3.4 for more details.
DS31256 256-channel, high-thro ughput hdlc controller 120 of 182 9.3.4 done queue the dma writes to the transmit done queue when it ha s finished either transmitting a complete packet chain or a complete data buffer. this option is selected by the host when it configures the dqs field in the transmit dma configuration ram (section 9.3.5 ). the descriptor location is indicated in the done queue through a 16-bit pointer that the host uses along with the transmit descriptor base address to find the exact 32-bit address of the associated transmit descriptor. figure 9-19. transmit done-queue descriptor dword 0 unused status (3) chrst pri hdlc channel (8) descriptor pointer (16) note: the organization of the done queue is not affected by the enabling of big endian. dword 0; bits 0 to 15/descriptor pointer. this 16-bit value is the offset from the transmit descriptor base address to either the first descriptor in a hdlc packet (can be a single descriptor) that has been transmitted (dqs = 0) or the descriptor that corresponds to a si ngle data buffer that has been transmitted (dqs = 1). dword 0; bits 16 to 23/hdlc channel number. hdlc channel number, which can be from 1 to 256. 00000000 (00h) = hdlc channel number 1 11111111 (ffh) = hdlc channel number 256 dword 0; bit 24/priority packet (pri). this field is meaningless in the done queue and could be set to any value. see section 9.3.3 for details. dword 0; bit 25/channel reset (chrst). this field is meaningless in the done queue and could be set to any value. see section 9.3.3 for details. dword 0; bits 26 to 28/packet status. these three bits report the final status of an outgoing packet. all the error states cause a hdlc abort sequence (eight 1s in a row, followed by continuous interfill bytes of either ffh or 7eh) to be sent, and the channel is placed out of service by the transmit dma, setting the channel enable (chen) bit in the transmit dma configuration ram to 0. the status state of 000 is only used when the channel has been configured by the host to write to the done queue only after a complete hdlc packet (can be a single data buffer) has been transmitted (i.e., dqs = 0). the status states of 001, 010, and 011 are only used when the channel has been configured by the host to write to the done queue after each data buffer has been transmitted (i.e., dqs = 1). 000 = packet transmission complete and the descriptor pointer field corresponds to the first descriptor in a hdlc packet (can be a single descriptor) that has been transmitted (dqs = 0) 001 = first buffer transmission complete of a multi (or single) buffe r packet (dqs = 1) 010 = middle buffer transmission complete of a multibuffer packet (dqs = 1) 011 = last buffer transmission complete of a multibuffer packet (dqs = 1) 100 = software provisioning error; this channel was not enabled 101 = descriptor error; either byte count = 0 or channel code inconsistent with pending queue 110 = pci error 111 = transmit fifo error; it has underflowed dword 0; bits 29 to 31/unused. not used by the dma. could be any value when read.
DS31256 256-channel, high-thro ughput hdlc controller 121 of 182 the host reads from the transmit done queue to find wh ich data buffers and their associated descriptors have completed transmission. the transmit done queue is circular queue. a set of internal addresses within the device that are accessed by both the host and the dma keep track of the circular queue addresses in the transmit done queue. on initialization, th e host configures all of the registers, as shown in table 9-k . after initialization, the dma only writes to (c hanges) the write pointer and the host only writes to the read pointer. empty case the transmit done queue is considered empty wh en the read and write pointers are identical. transmit done-queue empty state empty descriptor empty descriptor empty descriptor read pointer > empty descriptor < write pointer empty descriptor empty descriptor empty descriptor full case the transmit done queue is considered full when the r ead pointer is ahead of the write pointer by one descriptor. therefore, one descript or must always remain empty. transmit done-queue full state valid descriptor valid descriptor empty descriptor < write pointer read pointer > valid descriptor valid descriptor valid descriptor valid descriptor table 9-k. transmit done-que ue internal address storage register name address transmit done-queue base address 0 (lower word) tdqba0 0830h transmit done-queue base address 1 (upper word) tdqba1 0834h transmit done-queue dma write pointer tdqwp 0840h transmit done-queue host read pointer tdqrp 083ch transmit done-queue end address tdqea 0838h transmit done-queue fifo flush timer tdqfft 0844h note: transmit done-queue end address is not an absolute address. the absolute end address is ?base + tdqea x 4.?
DS31256 256-channel, high-thro ughput hdlc controller 122 of 182 figure 9-20. transmit done-queue structure once the transmit dma is activated (through the tde control bit in the master configuration register; see section 5 for more details), it can begin writing data to the done queue. it knows where to write data into the done queue by reading the write pointer and a dding it to the base address to obtain the actual 32- bit address. once the dma writes to the done queue, it increments the write pointer by one dword. a check must be made to ensure the incremented address does not exceed th e transmit done-queue end address. if the incremented address does exceed this a ddress, the incremented write pointer is set equal to 0000h (i.e., the base address). status bits/interrupts on writes to the done queue by the dma, the dma se ts the status bit for the transmit dma done-queue write (tdqw) in the status register for dma (sdma). the host can configure the dma to either set this status bit on each write to the done queue or only after multiple (from 2 to 128) writes. the host controls this by setting the tdqt0 to tdqt2 bits in the transmit dma queues-control (tdmaq) register. see the description of the tdmaq register at the end of this section for more details. the dma also checks the transmit done-queue host read pointer to ensure that an overflow does not occur. if this does occur, the dma sets the status bit for transm it dma done-queue write error (tdqwe) in the status register for dma (sdma), and it does not write to the done queue nor does it increment the write pointer. in such a scenario, information on transmitted packets is lost and unrecoverable. each of the status bits can also (if enabled) cause a hardware interrupt to occur. see section 5 for more details. done-queue bu rst writing the dma can write to the done queue in bursts. this allows for a more efficient use of the pci bus. the dma can hand off descriptors to the done queue in gr oups rather than one at a time, freeing up the pci bus for more time-critical functions. an internal fifo can store up to eight done-queue desc riptors (8 dwords, since ea ch descriptor occupies one dword). the host must configure the fifo for proper operation through the transmit dma queues control (tdmaq) register (see the following). dmatdq base + 00h base + 04h base + 08h base + 0ch base + 10h base + 14h base + end address done queue dma write pointer done queue host read pointer maximum of 65536 done queue descriptors dma readied done queue descriptor dma readied done queue descriptor dma readied done queue descriptor dma readied done queue descriptor host processed done queue descriptor host processed done queue descriptor host processed done queue descriptor
DS31256 256-channel, high-thro ughput hdlc controller 123 of 182 when enabled through the transmit done-queue fifo -enable (tdqfe) bit, the done-queue fifo does not write to the done queue until it reaches the high watermark. when the done-queue fifo reaches the high watermark (which is six descri ptors), it attempts to empty the done-queue fifo by burst writing to the done queue. before it writes to the done queue, it checks (by examining the transmit done-queue host read pointer) to ensure the done queue has enough room to empty. if the done queue does not have enough room, then it only burst writes enough descriptors to keep from overflowing. if the fifo detects that there is no room for any descriptors to be written, then it sets the status bit for transmit dma done- queue write error (tdqwe) in the sdma and it does not write to the done que ue nor does it increment the write pointer. in such a scenario, information on transmitted packets is lost and unrecoverable. if the done-queue fifo can write de scriptors to the done queue, then it burst writes them, increments the write pointer, and sets the status bit for transmit dma done-queue write (tdqw) in the sdma. see section 5 for more details about status bits. done-queue fifo flush timer to ensure the done-queue fifo gets flushed to the done queue on a regular basis, the transmit done- queue fifo flush timer (tdqfft) is used by the dma to determine the maximum wait time in between writes. the tdqfft is a 16-bit programmable counter that is decremented every pclk divided by 256. it is only monitored by the dma when the transmit done-queue fifo is enabled (tdqfe = 1). for a 33mhz pclk, the timer is decremented every 7.76  s. for a 25mhz clock, it decrements every 10.24  s. each time the dma writes to the done queue it resets the timer to the count placed into it by the host. on initialization, the host sets a value into the tdqfft that indicates the maximum time the dma should wait in between writes to the done queue. for example, with a pclk of 33mhz, the range of wait times is from 7.8  s (rdqfft = 0001h) to 508ms (rdqfft = ffffh). with a pclk of 25mhz, the wait times range from 10.2s (rdqfft = 0001h) to 671ms (rdqfft = ffffh). register name: tdqfft register description: transmit done-queue fifo flush timer register address: 0844h bit # 7 6 5 4 3 2 1 0 name tc7 tc6 tc5 tc4 tc3 tc2 tc1 tc0 default 0 0 0 0 0 0 0 0 bit # 15 14 13 12 11 10 9 8 name tc15 tc14 tc13 tc12 tc11 tc10 tc9 tc8 default 0 0 0 0 0 0 0 0 note: bits that are underlined are read-only; all other bits are read-write. bits 0 to 15/transmit done-queue fifo flush timer control bits (tc0 to tc15). please note that on system reset, the timer is set to 0000h, which is defined as an illegal setting. if the receive done-queue fifo is to be activated (tdqfe = 1), the host must first configure the timer to a proper state and then set the tdqfe bit to 1. 0000h = illegal setting 0001h = timer count resets to 1 ffffh = timer count resets to 65,536
DS31256 256-channel, high-thro ughput hdlc controller 124 of 182 register name: tdmaq register description: transmit dma queues control register address: 0880h bit # 7 6 5 4 3 2 1 0 name n/a n/a n/a n/a tdqf tdqfe tpqf tpqfe default 0 0 0 0 0 0 0 0 bit # 15 14 13 12 11 10 9 8 name n/a n/a n/a n/a n/a tdqt2 tdqt1 tdqt0 default 0 0 0 0 0 0 0 0 note: bits that are underlined are read-only; all other bits are read-write. bit 0/transmit pending-queue fifo enable (tpqfe). see section 9.3.3 for details. bit 1/transmit pending-queue fifo flush (tpqlf). see section 9.3.3 for details. bit 3/transmit done-queue fifo enable (tdqfe). this bit must be set to 1 to enable the dma to burst write descriptors to the done queue. if this bit is set to 0, descriptors are written one at a time. 0 = done-queue burst write disabled 1 = done-queue burst write enabled bit 4/transmit done-queue fifo flush (tdqf). when this bit is set to 1, the internal done-queue fifo is flushed by sending all data into the done queue. this bit must be set to 0 for proper operation. 0 = fifo in normal operation 1 = fifo is flushed bits 8 to 10/transmit done-queue status bit threshold setting (tdqt0 to tdqt2). these bits determine when the dma sets the transmit dma done-queue write (tdqw) status bit in the status register for dma (sdma) register. 000 = set the tdqw status bit after each descriptor write to the done queue 001 = set the tdqw status bit after 2 or more descriptors are written to the done queue 010 = set the tdqw status bit after 4 or more descriptors are written to the done queue 011 = set the tdqw status bit after 8 or more descriptors are written to the done queue 100 = set the tdqw status bit after 16 or more descriptors are written to the done queue 101 = set the tdqw status bit after 32 or more descriptors are written to the done queue 110 = set the tdqw status bit after 64 or more descriptors are written to the done queue 111 = set the tdqw status bit after 128 or more descriptors are written to the done queue
DS31256 256-channel, high-thro ughput hdlc controller 125 of 182 9.3.5 dma configuration ram the device contains an on-board set of 1536 dwords (6 dwords per channel times 256 channels) that are used by the host to configure the dma and used by the dma to store values locally when it is processing a packet. most of the fields within the dma configuration ram are for dma use and the host never writes to these fields. the host is only allowed to write (configure) to the lower word of dword 1 for each hdlc channel. in figure 9-21 , the host-configurable fields are denoted with a thick box. figure 9-21. transmit dma configuration ram dmatcram msb 31 lsb 0 transmit dma configuration ram 000h 004h 008h hdlc channel 1 00ch 010h 014h hdlc channel 256 fields shown within the thick box are written by the host; all other fields are for usage by the dma and can only be read by the host next descriptor pointer (16) next priority pending descriptor pointer (16) byte count (13) current packet data buffer address (32) start descriptor pointer (16) ch en last pending descriptor pointer (16) next pending descriptor pointer (16) next priority descriptor pointer (16) last priority pending descriptor pointer (16) dqs unused (16) eof cv pend st(2) pri st(2) unused (9) 17d8h 17dch 17f0h 17f4h 17f8h 17fch ppp un- used next descriptor pointer (16) next priority pending descriptor pointer (16) byte count (13) current packet data buffer address (32) start descriptor pointer (16) ch en last pending descriptor pointer (16) next pending descriptor pointer (16) next priority descriptor pointer (16) last priority pending descriptor pointer (16) dqs unused (16) eof cv pend st(2) pri st(2) unused (9) ppp un- used
DS31256 256-channel, high-thro ughput hdlc controller 126 of 182 - for dma use only/host can only read this field - dword 0; bits 0 to 31/current data buffer address. this is the current 32-bit address of the data buffer that is being used. this address is used by the dma to keep track of where data should be read from as it is passed to the transmit fifo. - host must configure - dword 1; bit 0/channel enable (chen). this bit is controlled by both the host and the transmit dma to enable and disable a hdlc channel. the dma automatically disables a channel when an error condition occurs (see section 9.2.1 for a discussion on error conditions). the dma automatically enables a channel when it detects that the channel reset (chrst) bit in the pending-queue descriptor is set to 1. 0 = hdlc channel disabled 1 = hdlc channel enabled - host must configure - dword 1; bit 1/done-queue select (dqs). this bit determines whether the transmit dma writes to the done queue only after a complete hdlc packet (which may be only a single buffer) has been transmitted (in which case the descriptor pointer in the done queue corresponds to the first descriptor of the packet) or whether it should write to the done queue after each data buffer has been transmitted (in which case the descriptor pointer in the done queue corresponds to a single data buffer). the setting of this bit also affects the reporting of the status field in the transmit done queue. when dqs = 0, the only nonerrored status possible is a setting of 000. when dqs = 1, then the nonerrored settings of 001, 010, and 011 are possible. 0 = write to the done queue only after a complete hdlc packet has been transmitted 1 = write to the done queue after each data buffer is transmitted - for dma use only/host can only read this field - dword 1; bit 2/unused. this field is not used by the dma and could be any value when read. - for dma use only/host can only read this field - dword 1; bits 3 to 15/byte count. the dma uses these 13 bits to keep track of the number of bytes stored in the data buffer. maximum is 8188 bytes (0000h = 0 bytes / 1ffch = 8188 bytes). - for dma use only/host can only read this field - dword 1; bit 16/chain valid (cv). this is an internal copy of the cv field that resides in the current packet descriptor that the dma is operating on. see section 9.2.2 for more details on the cv bit. - for dma use only/host can only read this field - dword 1; bit 17/end of frame (eof). this is an internal copy of the eof field that resides in the current packet descriptor that the dma is operating on. see section 9.2.2 for more details about the eof bit. - for dma use only/host can only read this field - dword 1; bits 18 to 19/pending state (pendst). this field is used by the transmit dma to keep track of queued descriptors as they arrive from the pending queue and for the dma to know when it should create a horizontal linked list of transmit descriptors and where it can find the next valid descriptor. this field handles standard packets and the prist field handles priority packets. state next descriptor pointer field next pending descriptor pointer field 00 not valid not valid 01 valid not valid 10 not valid valid 11 valid valid
DS31256 256-channel, high-thro ughput hdlc controller 127 of 182 - for dma use only/host can only read this field - dword 1; bits 20 to 21/priority state (prist). this field is used by the transmit dma to keep track of queued priority descriptors as they arrive from the pending queue, and for the dma to know when it should create a horizontal linked list of transmit priority descriptors and where it can find the next valid priority descriptor. this field handles priority packets and the pendst field handles standard packets. state next priority descriptor pointer field next priority pending descriptor pointer field 00 not valid not valid 01 valid not valid 10 not valid valid 11 valid valid -for dma use only/host can only read this field - dword 1; bit 22/processing priority packet (ppp). this bit is set to 1 when the dma is currently processing a priority packet. - for dma use only/host can only read this field - dword 1; bits 23 to 31/unused . this field is not used by the dma and could be any value when read. - for dma use only/host can only read this field - dword 2; bits 0 to 15/next descriptor pointer. this 16-bit value is the offset from the transmit descriptor base address of the next transmit packet descriptor for the packet that is currently being transmitted. only valid if eof = 0 or if eof = 1 and cv = 1. - for dma use only/host can only read this field - dword 2; bits 16 to 31/start descriptor pointer. this 16-bit value is the offset from the transmit descriptor base address of the first transmit packet descriptor for the pack et that is currently being transmitted. if dqs = 0, then this pointer is written back to the done queue when the packet has completed transmission. this field is used by the dma for processing standard as well as priority packets. - for dma use only/host can only read this field - dword 3; bits 0 to 15/next pending descriptor pointer. this 16-bit value is the offset from the transmit descriptor base address of the first transmit packet descriptor for the packet that is queued up next for transmission. - for dma use only/host can only read this field - dword 3; bits 16 to 31/last pending descriptor pointer. this 16-bit value is the offset from the transmit descriptor base address of the first transmit packet descriptor for the packet that is queued up last for transmission. - for dma use only/host can only read this field - dword 4; bits 0 to 15/next priority descriptor pointer. this 16-bit value is the offset from the transmit descriptor base address of the next transmit priority packet descriptor for the priority packet that is currently being transmitted. only valid if eof = 0 or if eof = 1 and cv = 1. - for dma use only/host can only read this field - dword 4; bits 16 to 31/unused. this field is not used by the dma and could be any value when read. - for dma use only/host can only read this field - dword 5; bits 0 to 15/last priority pending descriptor pointer. this 16-bit value is the offset from the transmit descriptor base address of the first transmit priority packet descriptor for the priority packet that is queued up last for transmission.
DS31256 256-channel, high-thro ughput hdlc controller 128 of 182 - for dma use only/host can only read this field - dword 5; bits 16 to 31/next priority pending descriptor pointer. this 16-bit value is the offset from the transmit descriptor base address of the first transmit priority packet descriptor for the packet priority that is queued up next for transmission. register name: tdmacis register description: transmit dma configuration indirect select register address: 0870h bit # 7 6 5 4 3 2 1 0 name hcid7 hcid6 hcid5 hcid4 hcid3 hcid2 hcid1 hcid0 default 0 0 0 0 0 0 0 0 bit # 15 14 13 12 11 10 9 8 name iab iarw n/a n/a tdcw3 tdcw2 tdcw1 tdcw0 default 0 0 0 0 0 0 0 0 note: bits that are underlined are read-only; all other bits are read-write. bits 0 to 7/hdlc channe l id (hcid0 to hcid7) 00000000 (00h) = hdlc channel number 1 11111111 (ffh) = hdlc channel number 256 bits 8 to 11/transmit dma configuration ram word select bits 0 to 3 (tdcw0 to tdcw3) 0000 = lower word of dword 0 0001 = upper word of dword 0 0010 = lower word of dword 1 (only word that the host can write to) 0011 = upper word of dword 1 0100 = lower word of dword 2 0101 = upper word of dword 2 0110 = lower word of dword 3 0111 = upper word of dword 3 1000 = lower word of dword 4 1001 = upper word of dword 4 1010 = lower word of dword 5 1011 = upper word of dword 5 bit 14/indirect access read/write (iarw). when the host wishes to read data from the internal transmit dma configuration ram, the host should write this bit to 1. this causes the device to begin obtaining the data from the channel location indicated by the hcid bits. during the read access, the iab bit is set to 1. once the data is ready to be read from the tdmac register, the iab bit is set to 0. when the host wishes to write data to the internal transmit dma configuration ram, this bit should be written to 0 by the host. this causes the device to take the data that is currently present in the tdmac register and write it to the channel location indicated by the hcid bits. when the device has completed the write, the iab bit is set to 0. bit 15/indirect access busy (iab). when an indirect read or write access is in progress, this read-only bit is set to 1. during a read operation, this bit is set to 1 until the data is ready to be read. it is set to 0 when the data is ready to be read. during a write operation, this bit is set to 1 while the write is taking place. it is set to 0 once the write operation has completed.
DS31256 256-channel, high-thro ughput hdlc controller 129 of 182 register name: tdmac register description: transmit dma configuration register address: 0874h bit # 7 6 5 4 3 2 1 0 name d7 d6 d5 d4 d3 d2 d1 d0 default 0 0 0 0 0 0 0 0 bit # 15 14 13 12 11 10 9 8 name d15 d14 d13 d 12 d11 d10 d9 d8 default 0 0 0 0 0 0 0 0 note: bits that are underlined are read only, all other bits are read-write. bits 0 to 15/transmit dma configuration ram data (d0 to d15). data that is written to or read from the transmit dma configuration ram.
DS31256 256-channel, high-thro ughput hdlc controller 130 of 182 10. pci bus 10.1 general description of operation the pci block interfaces the dma block to an exte rnal high-speed bus. the pci block complies with revision 2.1 (june 1, 1995) of the pci local bus speci fication. hdlc packet data always passes to and from the envoy through the pci bus. the user has th e option to configure and monitor the internal device registers either through the pci bus (local bus bridge mode) or through the local bus (local bus configuration mode). when the local bus bridge mode is used, the host on the pci bus can also bridge to the local bus and sets/monitors the pci configuration registers. when the local bus configuration mode is used, the cpu on the local bus sets/monito rs the pci configuration registers. the pci configuration registers ( figure 10-1 ) are described in detail in section 10.2 . the following notes apply to the pci configuration registers: 1) all unused locations (the shaded areas of figure 10-1 ) return zeros when read. 2) read-only locations can be written with either 1 or 0 with no effect. 3) all bits are read/wr ite, unless otherwise noted. figure 10-1. pci configuration memory map 0x000 0x004 0x008 0x00c 0x010 0x03c 0x100 0x104 0x108 0x10c 0x110 device id vendor id status command class code revision id header type latency time r base address for device configuration 0x000 max. latenc y min. gran t interrupt pin interrupt line header type device id vendor id status command class code revision id 0x00000 base address for local bus cache line size interrupt pin interrupt line 0x13c
DS31256 256-channel, high-thro ughput hdlc controller 131 of 182 10.1.1 pci read cycle a read cycle on the pci bus is shown in figure 10-2 . during clock cycle #1, the initiator asserts the pframe signal and drives the address onto the pad signal lines and the bus command (which would be a read) onto the pcbe signal lines. the target reads the a ddress and bus command and, if the address matches its own, it then asserts the pdevsel signal and begins the bus transaction. during clock cycle #2, the initiator stops driving the address ont o the pad signal lines and switches the pcbe signal lines to indicate byte enables. it also asserts the pirdy signal and begins monitoring the pdevsel and ptrdy signals. during clock cycle #4, the target asserts ptrdy , indicating to the initiator that valid data is available to be read on the pad signal lines by the initiator. during clock cycle #5, the target is not ready to provide data #2 because ptrdy is deasserted. during cloc k cycle #6, the target again asserts ptrdy , informing the initiator to read data #2. du ring clock cycle #7, the initiator deasserts pirdy , indicating to the target that it is not ready to accept data. during clock cycle #8, the initiator asserts pirdy and acquires data #3. also during clock cycle #8, the initiator deasserts pframe , indicating to the target that the bus transaction is complete and no more data needs to be read. during clock cycle #9, the target deasserts ptrdy and pdevsel and the initiator deasserts pirdy . the pxas , pxds , and pxblast signals are not part of a sta ndard pci bus. these pci extension signals are unique to the device and are useful in ad apting the pci bus to a proprietary bus scheme. they are only asserted when the device is a bus master. figure 10-2. pci bus read 12345678910 data #3 a ddress cmd byte enable #1 pcl k p fram e pad p cb e p ird y p trd y p devse l p xd s p xa s p xblas t data #1 data #2 be #2 be #3
DS31256 256-channel, high-thro ughput hdlc controller 132 of 182 10.1.2 pci write cycle a write cycle on the pci bus is shown in figure 10-3 . during clock cycle #1, the initiator asserts the pframe signal and drives the address onto the pad signal lines and the bus command (which would be a write) onto the pcbe signal lines. the target reads the addr ess and bus command a nd, if the address matches its own, it then asserts the pdevsel signal and begins the bus transaction. during clock cycle #2, the initiator stops driving the address onto the pad signal lines and begins driving data #1. it also switches the pcbe signal lines to indicate the byte enab le for data #1. the initiator asserts the pirdy signal and begins monitoring the pdevsel and ptrdy signals. during clock cycle #3, the initiator detects that pdevsel and ptrdy are asserted, which indicates that the target has accepted data #1 and the initiator begins driving the data and byte enable for data #2. during clock cycle #4, since pdevsel and ptrdy are asserted, data #2 is writ ten by the initiator to the target. during clock cycle #5, both pirdy and ptrdy are deasserted, indicating that neither the initiator nor the target are ready for data #3 to be passed. during clock cycle #6, the initiator is ready so it asserts pirdy and deasserts pframe, which indicates that data #3 is the last one pa ssed. during clock cycle #8, the target asserts ptrdy , which indicates to the initiator that data #3 is ready to be accepted by the target. during clock cycle #9, the initiator deasserts pirdy and stops driving the pad and pcbe signal lines. the target deasserts pdevsel and ptrdy . the pxas , pxds , and pxblast signals are not part of a sta ndard pci bus. these pci extension signals are unique to the device. they are useful in adapting the pci bus to a proprietary bus scheme. they are only asserted when the device is a bus master. figure 10-3. pci bus write 12345678910 data #1 a ddress cmd be #1 pcl k p fram e pad p cb e p ird y p trd y p devse l p xd s p xa s p xblas t data #2 data #3 be #2 be #3
DS31256 256-channel, high-thro ughput hdlc controller 133 of 182 10.1.3 pci bus arbitration the pci bus can be arbitrated as shown in figure 10-4 . the initiator requests bus access by asserting preq . a central arbiter grants the access some time later by asserting pgnt . once the bus has been granted, the initiator waits until both pirdy and pframe are deasserted (i.e., an idle cycle) before acquiring the bus and beginning the transaction. as shown in figure 10-3 , the bus was still being used when it was granted and the device had to wait until clock cycle #6 before it acquired the bus and began the transaction. the arbiter can deassert pgnt at any time and the initiator must relinquish the bus after the current transfer is complete, which can be limited by the latency timer. figure 10-4. pci bus arbitration signaling protocol 10.1.4 pci initiator abort if a target fails to respond to an initiator by asserting pdevsel and ptrdy within 5 clock cycles, then the initiator aborts the transaction by deasserting pframe and then, one clock la ter, by deasserting pidry ( figure 10-5 ). if such a scenario occurs, it is reported through the master abort status bit in the pci command/status configuration register (section 10.2 ). figure 10-5. pci initiator abort 12345678910 pcl k p re q p gn t p fram e bus is relinquished bus is acquired wait for pgnt asserted and then pfram e and p irdy deasserted 12345678910 pcl k p fram e p ird y p trd y p devse l
DS31256 256-channel, high-thro ughput hdlc controller 134 of 182 10.1.5 pci target retry targets can terminate the requested bus transaction before any data is transferred because the target is busy and temporarily unable to pro cess the transaction. such a termina tion is called a target retry and no data is transferred. a target retry is signaled to the initiator by the assertion of pstop and not asserting ptrdy on the initial data phase ( figure 10-6 ). when the DS31256 is a target, it only issues a target retry when the host is accessing the local bus. this occurs when the local bus is operating in the arbitration mode. it is busy at the instant the host requests access to the local bus. see section 11.1 for more details about the op eration of the local bus. figure 10-6. pci target retry 10.1.6 pci target disconnect a target can prematurely terminate a transaction by asserting pstop ( figure 10-7 ). depending on the current state of the ready signals when psto p is asserted, data may or may not be transferred. the target always deasserts pstop when it detects that the initiator has deasserted pframe . when the DS31256 is a target, it disconnects with data after the first data phase is complete, if the master attempts a burst transaction. this is because the device does not support burst transactions when it is a target. when it is an initiator and experiences a disconnect from the target, it attempts another bus transaction (if it still has the bus granted) after waiting either one (disconnect without data) or two clock cycles (disconnect with data). figure 10-7. pci target disconnect 12345678910 pcl k p fram e p sto p p devse l 12345678910 pcl k p fram e p sto p p devse l p trd y p ird y
DS31256 256-channel, high-thro ughput hdlc controller 135 of 182 10.1.7 pci target abort targets can also abort the current transaction, which means they do not wish for the initiator to attempt the request again. no data is transferred in a target abort scenario. a target abort is signaled to the initiator by the simultaneous assertion of pstop and deassertion of pdevsel ( figure 10-8 ). when the DS31256 is a target, it only issues a target abort when the host is accessing the local bus. this occurs when the host attempts a bus transaction with a combination of byte enables ( pcbe ) that are not supported by the local bus. if such a scenario occurs , it reports through the targ et-abort-initiated status bit in the pci command/status conf iguration register (section 10.2 ). see section 11.1 for details about local bus operation. when the DS31256 is a bus master, if it det ects a target abort, it reports through the target abort detected by master status bit in the pc i command/status configuration register (section 10.2 ). figure 10-8. pci target abort 12345678910 pcl k p fram e p sto p p devse l p trd y
DS31256 256-channel, high-thro ughput hdlc controller 136 of 182 10.1.8 pci fast back-to-back fast back-to-back transactions are two consecutive bus transactions without the usually required idle cycle ( pframe and pirdy deasserted) between them. this can only occur when there is a guarantee that there is not any contention on the signal lines. the pci specification allows two types of fast back- to-back transactions?those that access the same agent (type 1) and those that do not (type 2). figure 10-9 shows an example of a fast back-to-back transaction where no idle cycle exists. as a bus master, the DS31256 cannot perform a type 2 access. as a target, it can accept both types of fast back- to-back transactions. figure 10-9. pci fast back-to-back 12345678910 data #1 a ddress cmd be #1 pcl k p fram e pad p cb e p ird y p trd y p devse l data #2 data #2 be #2 be #2 a ddress data #1 cmd be #1
DS31256 256-channel, high-thro ughput hdlc controller 137 of 182 10.2 pci configuration register description register name: pvid0 register description: pci vendor id/device id register 0 register address: 0x000 lsb vendor id (read only/set to eah) vendor id (read only/set to 13h) device id (read only/set to 34h) msb device id (read only/set to 31h) bits 0 to 15/vendor id . these read-only bits identify dallas semiconductor as the device?s manufacturer. the vendor id was assigned by the pci special interest group and is fixed at 13eah. bits 16 to 31/device id. these read-only bits identify the DS31256 as the device being used. the device id was assigned by dallas semiconductor and is fixed at 31256h. register name: pcmd0 register description: pci command/status register 0 register address: 0x004 lsb stepc parc vga mwen scc masc msc ioc reserved (read only/set to all zeros) fbben psec fbbct udf 66mhz reserved (read only/set to all zeros) msb ppe pse mabt tabtm tabt dts1 dts0 parr note: read-only bits in the pcmd0 register are underlined; all other bits are read-write. the lower word (bits 0 to 15) of the pcmd0 register is the command portion and is used for pci bus control. when all bits in the lower word are set to 0, the device is logically disconnected from the bus for all accesses, except for accesses to the configuration registers. the upper word (bits 16 to 31) is the status portion and is used for status information. reads to the status portion behave normally but writes are unique in that bits can be reset (i.e., forced to 0) but not set (i.e., forced to 1). a bit in the status portion resets when 1 is written to that bit position. bit positions that have 0 written to them do not reset.
DS31256 256-channel, high-thro ughput hdlc controller 138 of 182 10.2.1 command bits (pcmd0) bit 0/i/o space control (ioc). this read-only bit is forced to 0 by the device to indicate that it does not respond to i/o space accesses. bit 1/memory space control (msc). this read/write bit controls whether or not the device responds to accesses by the pci bus to the memory space (the internal device configuration registers). when this bit is set to 0, the device ignores accesses attempted to the internal configuration registers. when set to 1, the device allows accesses to the internal configuration registers. this bit shou ld be set to 0 when the local bus is operated in the configuration mode. this bit is forced to 0 when a hardware reset is initiated through the prst pin. 0 = ignore accesses to the internal device configuration registers 1 = allow accesses to the internal device configuration registers bit 2/master control (masc). this read/write bit controls whether or not the device can act as a master on the pci bus. when this bit is set to 0, the device cannot act as a master. when it is set to 1, the device can act as a bus master. this bit is forced to 0 when a hardware reset is initiated through the prst pin. 0 = deny the device from operating as a bus master 1 = allow the device to operate as a bus master bit 3/special cycle control (scc). this read-only bit is forced to 0 by the device to indicate that it cannot decode special cycle operations. bit 4/memory write and invalidate command enable (mwen). this read-only bit is forced to 0 by the device to indicate that it cannot generate the memory write and invalidate command. bit 5/vga control (vga). this read-only bit is forced to 0 by the device to indicate that it is not a vga- compatible device. bit 6/parity error response control (parc). this read/write bit controls whether or not the device should ignore parity errors. when this bit is set to 0, the device ignores any parity errors that it detects and continues to operate normally. when this bit is set to 1, the device must act on parity errors. this bit is forced to 0 when a hardware reset is initiated through the prst pin. 0 = ignore parity errors 1 = act on parity errors bit 7/address stepping control (stepc). this read-only bit is forced to 0 by the device to indicate that it is not capable of address/data stepping. bit 8/pci system error control (psec). this read/write bit controls whether or not the device should enable the pserr output pin. when this bit is set to 0, the device disables the pserr pin. when this bit is set to 1, the device enables the pserr pin. this bit is forced to 0 when a hardware reset is initiated through the prst pin. 0 = disable the pserr pin 1 = enable the pserr pin bit 9/fast back-to-back master enable (fbben). this read-only bit is forced to 0 by the device to indicate that it is not capable of generating fast back-to-back transactions to different agents. bits 10 to 15/reserved. these read-only bits are forced to 0 by the device.
DS31256 256-channel, high-thro ughput hdlc controller 139 of 182 10.2.2 status bits (pcmd0) the upper word in the pcmd0 register is the status portion, which reports events as they occur. as previously mentioned, reads of the status portion occur normally but writes are unique in that bits can only be reset (i.e., forced to 0). this occurs when 1 is written to a bit position. writes with a 0 to a bit position have no effect. this allows individual bits to be reset. bits 16 to 20/reserved. these read-only bits are forced to 0 by the device. bit 21/66mhz capable (66mhz). this read-only bit is forced to 0 by the device to indicate that it is not capable of running at 66mhz. bit 22/user-definable features capable (udf). this read-only bit is forced to 0 by the device to indicate that it does not support user-definable features. bit 23/fast back-to-back capable target (fbbct). this read-only bit is forced to 1 by the device to indicate that it is capable of accepting fast back-to-back transactions when the transactions are not from the same agent. bit 24/pci parity error reported (parr). this read/write bit is set to 1 when the device is a bus master and detects or asserts the pperr signal when the parc command bit is enabled. this bit can be reset (set to 0) by the host by writing 1 to this bit. 0 = no parity errors have been detected 1 = parity errors detected bits 25, 26/device timing select bits 0 and 1 (dts0 and dts1). these read-only bits are forced to 01b by the device to indicate that it is capable of the medium timing requirements for the pdevsel signal. bit 27/target abort initiated (tabt). this read-only bit is forced to 0 by the device since it does not terminate a bus transaction with a target abort when the device is a target. bit 28/target abort detected by master (tabtm). this read/write bit is set to 1 when the device is a bus master and it detects that a bus transaction has been aborted by the target with a target abort. this bit can be reset (set to 0) by the host by writing 1 to this bit. bit 29/master abort (mabt). this read/write bit is set to 1 when the device is a bus master and the bus transaction is terminated with a master abort (except for special cycle). this bit can be reset (set to 0) by the host by writing 1 to this bit. bit 30/pci system error reported (pse). this read/write bit is set to 1 when the device asserts the pserr signal. this bit can be reset (set to 0) by the host by writing 1 to this bit. bit 31/pci parity error reported (ppe). this read/write bit is set to 1 when the device detects a parity error (even if parity is disabled through the parc command bit). this bit can be reset (set to 0) by the host by writing 1 to this bit.
DS31256 256-channel, high-thro ughput hdlc controller 140 of 182 register name: prcc0 register description: pci revision id/class code register 0 register address: 0x008h lsb revision id (read only/set to 00h) class code (read only/set to 00h) class code (read only/set to 80h) msb class code (read only/set to 02h) bits 0 to 7/revision id. these read-only bits identify the specific device revision, which is selected by dallas semiconductor. bits 8 to 15/class code interface. these read-only bits identify the subclass interface value for the device and are fixed at 00h. see appendix d of pci local bus specification revision 2.1 for details. bits 16 to 23/class code subclass. these read-only bits identify the subclass value for the device and are fixed at 80h, which indicate ?other network controller.? see a ppendix d of pci local bus specification revision 2.1 for details. bits 24 to 31/class code base class. these read-only bits identify the base class value for the device and are fixed at 02h, which indicate ?network controllers.? see appendix d of pci local bus specification revision 2.1 for details. register name: plth0 register description: pci latency timer/header type register 0 register address: 0x00ch lsb cache line size latency timer header type (read only/set to 80h) msb bist (read only/set to 00h) bits 0 to 7/cache line size. these read/write bits indicate the cache line size in terms of dwords. if the burst size of a data read transaction exceeds this value, the pci block uses the memory read multiple command. valid settings are 04h (4 dwords), 08h, 10h, 20h, and 40h (64 dwords). other settings are interpreted as 00h. these bits are forced to 0 when a hardware reset is initiated through the prst pin. bits 8 to 15/latency timer. these read/write bits indicate the value of the latency timer (in terms of the number of pci clocks) for use when the device is a bus master. these bits are forced to 0 when a hardware reset is initiated through the prst pin. bits 16 to 23/header type. these read-only bits are forced to 80h, which indicate a multifunction device. bits 24 to 31/built-in self-test (bist). these read only bits are forced to 0.
DS31256 256-channel, high-thro ughput hdlc controller 141 of 182 register name: pdcm register description: pci device configuration memory base address register register address: 0x010h lsb base address (read only/set to 0h) pf type1 type0 msi base address base address (read only/set to 0h) base address msb base address note: read-only bits in the pdcm register are underlined; all other bits are read-write. bit 0/memory space indicator (msi). this read-only bit is forced to 0 to indicate that the internal device configuration registers are mapped to memory space. bits 1, 2/type 0, type 1. these read-only bits are forced to 00b to indicate that the internal device configuration registers can be mapped anywhere in the 32-bit address space. bit 3/prefetchable (pf). this read-only bit is forced to 0 to indicate that prefetching is not supported by the device for the internal device configuration registers. bits 4 to 11/base address. these read-only bits are forced to 0 to indicate that the internal device configuration registers require 4kb of memory space. bits 12 to 31/base address. these read/write bits define the location of the 4kb memory space that is mapped to the internal configuration registers. these bits correspond to the most significant bits of the pci address space. register name: pintl0 register description: pci interrupt line and pin/minimum grant/maximum latency register 0 register address: 0x03ch lsb interrupt line interrupt pin (read only/set to 01h) maximum grant (read only/set to 05h) msb maximum latency (read only/set to 0 fh) bits 0 to 7/interrupt line. these read/write bits indicate and store interrupt line routing information. the device does not use this information, it is only posted here for the host to use. bits 8 to 15/interrupt pin. these read-only bits are forced to 01h to indicate that pinta is used as an interrupt. bits 16 to 23/minimum grant. these read-only bits are used to indicate to the host how long of a burst period the device needs, assuming a clock rate of 33mhz. the values placed in these bits specify a period of time in 0.25  s increments. these bits are forced to 05h. bits 24 to 31/maximum latency. these read-only bits are used to indicate to the host how often the device needs to gain access to the pci bus. the values plac ed in these bits specify a period of time in 0.25  s increments. these bits are forced to 0fh.
DS31256 256-channel, high-thro ughput hdlc controller 142 of 182 register name: pvid1 register description: pci vendor id/device id register 1 register address: 0x100h lsb vendor id (read only/set to eah) vendor id (read only/set to 13h) device id (read only/set to 34h) msb device id (read only/set to 31h) bits 0 to 15/vendor id. these read-only bits identify dallas semiconductor as the device?s manufacturer. the vendor id was assigned by the pci special interest group and is fixed at 13eah. bits 16 to 31/device id. these read-only bits identify the DS31256 as the device being used. the device id was assigned by dallas semiconductor and is fixed at 31256h. register name: pcmd1 register description: pci command/status register 1 register address: 0x104h lsb stepc parc vga mwen scc masc msc ioc reserved (read only/set to all zeros) fbben psec fbbct udf 66mhz reserved (read only/set to all zeros) msb ppe pse mabt tabtm tabt dts1 dts0 parr note: read-only bits in the pcmd1 register are underlined; all other bits are read-write. the lower word (bits 0 to 15) of the pcmd1 register is the command portion and is used for the pci bus control. when all bits in the lower word are set to 0, the device is logically disconnected from the bus for all accesses, except for accesses to the configuration registers. the upper word (bits 16 to 31) is the status portion and is used for status information. reads to the status portion behave normally but writes are unique in that bits can be reset (i.e., forced to 0) but not set (i.e., forced to 1). a bit in the status portion is reset when a 1 is written to that bit position. bit positions that have 0 written to them do not reset.
DS31256 256-channel, high-thro ughput hdlc controller 143 of 182 10.2.3 command bits (pcmd1) bit 0/i/o space control (ioc). this read-only bit is forced to 0 by the device to indicate that it does not respond to i/o space accesses. bit 1/memory space control (msc). this read/write bit controls whether or not the device responds to accesses by the pci bus to the memory space, which is the local bus. when this bit is set to 0, the device ignores accesses attempted to the local bus. when set to 1, the device allo ws accesses to the local bus. this bit should be set to 0 when the local bus operates in configuration mode. this bit is forced to 0 when a hardware reset is initiated through the prst pin. 0 = ignore accesses to the local bus 1 = allow accesses to the bus bit 2/master control (masc). this read-only bit is forced to 0 by the device since it cannot act as a bus master. bit 3/special cycle control (scc). this read-only bit is forced to 0 by the device to indicate that it cannot decode special cycle operations. bit 4/memory write and invalidate command enable (mwen). this read-only bit is forced to 0 by the device to indicate that it cannot generate the memory write and invalidate command. bit 5/vga control (vga). this read-only bit is forced to 0 by the device to indicate that it is not a vga- compatible device. bit 6/parity error response control (parc). this read/write bit controls whether or not the device should ignore parity errors. when this bit is set to 0, the device ignores any parity errors that it detects and continues to operate normally. when this bit is set to 1, the device must act on parity errors. this bit is forced to 0 when a hardware reset is initiated through the prst pin. 0 = ignore parity errors 1 = act on parity errors bit 7/address stepping control (stepc). this read-only bit is forced to 0 by the device to indicate that it is not capable of address/data stepping. bit 8/pci system error control (psec). this read/write bit controls whether or not the device should enable the pserr output pin. when this bit is set to 0, the device disables the pserr pin. when this bit is set to 1, the device enables the pserr pin. this bit is forced to 0 when a hardware reset is initiated through the prst pin. 0 = disable the pserr pin 1 = enable the pserr pin bit 9/fast back-to-back master enable (fbben). this read-only bit is forced to 0 by the device to indicate that it is not capable of generating fast back-to-back transactions to different agents. bits 10 to 15/reserved. these read-only bits are forced to 0 by the device.
DS31256 256-channel, high-thro ughput hdlc controller 144 of 182 10.2.4 status bits (pcmd1) the upper word in the pcmd1 register is the status portion, which reports events as they occur. as mentioned earlier, reads of the status portion occur normally, but writes are unique in that bits can only be reset (i.e., forced to 0). this occurs when a 1 is written to a bit position. writ es with a 0 to a bit position have no effect. this allows individual bits to be reset. bits 16 to 20/reserved. these read-only bits are forced to 0 by the device. bit 21/66mhz capable (66mhz). this read-only bit is forced to 0 by the device to indicate that it is not capable of running at 66mhz. bit 22/user-definable features capable (udf). this read-only bit is forced to 0 by the device to indicate that it does not support user-definable features. bit 23/fast back-to-back capable target (fbbct). this read-only bit is forced to 1 by the device to indicate that it is capable of accepting fast back-to-back transactions when the transactions are not from the same agent. bit 24/pci parity error reported (parr). this read-only bit is forced to 0 by the device since the device cannot act as a bus master. bits 25, 26/device timing select bits 0 and 1 (dts0 and dts1). these read-only bits are forced to 01b by the device to indicate that they are capable of the medium timing requirements for the pdevsel signal. bit 27/target abort initiated (tabt). this read/write bit is set to 1 when the device terminates a bus transaction with a target abort. this occurs only when the local bus is operating in the bus arbitration mode and the local bus does not have bus control when the host requests access. this bit can be reset (set to 0) by the host by writing a 1 to this bit. bit 28/target abort detected by master (tabtm). this read-only bit is forced to 0 by the device since the device cannot act as a bus master. bit 29/master abort (mabt). this read-only bit is forced to 0 by the device since the device cannot act as a bus master. bit 30/pci system error reported (pse). this read/write bit is set to 1 when the device asserts the pserr signal (even if it is disabled through the psec command bit). this bit can be reset (set to 0) by the host by writing 1 to this bit. bit 31/pci parity error reported (ppe). this read/write bit is set to 1 when the device detects a parity error. the host can reset this bit (set to 0) by writing a 1 to this bit.
DS31256 256-channel, high-thro ughput hdlc controller 145 of 182 register name: prcc1 register description: pci revision id/class code register 1 register address: 0x108h lsb revision id (read only/set to 00h) class code (read only/set to 00h) class code (read only/set to 80h) msb class code (read only/set to 06h) bits 0 to 7/revision id. these read-only bits identify the specific device revision, selected by dallas semiconductor. bits 8 to 15/class code interface. these read-only bits identify the subclass interface value for the device and are fixed at 00h. see appendix d of pci local bus specification revision 2.1 for details. bits 16 to 23/class code subclass. these read-only bits identify the subclass value for the device and are fixed at 80h, indicating ?other bridge device.? see appendix d of pci local bus specification revision 2.1 for details. bits 24 to 31/class code base class. these read-only bits identify the base class value for the device and are fixed at 06h, which indicate ?bridge devices.? see appe ndix d of pci local bus specification revision 2.1 for details. register name: plth1 register description: pci latency timer/header type register 1 register address: 0x10ch lsb cache line size (read only/set to 00h) latency timer (read only/set to 00h) header type (read only/set to 80h) msb bist (read only/set to 00h) bits 0 to 7/cache line size. these read-only bits are forced to 0. bits 8 to 15/latency timer. these read-only bits are forced to 0 by the device since the device cannot act as a bus master. bits 16 to 23/header type. these read-only bits are forced to 80h, which indicate a multifunction device. bits 24 to 31/built-in self-test (bist). these read-only bits are forced to 0.
DS31256 256-channel, high-thro ughput hdlc controller 146 of 182 register name: plbm register description: pci local bus memory base address register register address: 0x110h lsb base address (read only/set to 0h) pf type1 type0 msi base address base address (read only/set to 0h) base address msb base address note: read-only bits in the plbm register are underlined; all other bits are read-write. bit 0/memory space indicator (msi). this read-only bit is forced to 0 to indicate that the local bus is mapped to memory space. bits 1 and 2/type 0 and type 1. these read-only bits are forced to 00b to indicate that the local bus can be mapped anywhere in the 32 bit address space. bit 3/prefetchable (pf). this read-only bit is forced to 0 to indicate that prefetching is not supported by the device for the local bus. bits 4 to 19/base address. these read-only bits are forced to 0 to indicate that the local bus requires 1mb of memory space. bits 20 to 31/base address. these read/write bits define the location of the 1mb memory space that is mapped to the local bus. these bits correspond to the most significant bits of the pci address space. register name: pintl1 register description: pci interrupt line and pin/minimum grant/maximum latency register 1 register address: 0x13ch lsb interrupt line interrupt pin (read only/set to 01h) maximum grant (read only/set to 00h) msb maximum latency (read only/set to 00h) bits 0 to 7/interrupt line. these read/write bits indicate and store interrupt line routing information. the device does not use this information, it is only posted here for the host to use. bits 8 to 15/interrupt pin. these read-only bits are forced to 01h to indicate that pinta is used as an interrupt. bits 16 to 23/minimum grant. these read-only bits are forced to 0. bits 24 to 31/maximum latency. these read-only bits are forced to 0.
DS31256 256-channel, high-thro ughput hdlc controller 147 of 182 11. local bus 11.1 general description the local bus can operate in two modes, either as a pci bridge (master mode) or as a configuration bus (slave mode). this selection is made in hard ware by connecting the lms pin high or low. figure 11-1 shows an example of the local bus operating in the pci bridge mode. in this example, the host can access the control ports on the t1/e1 devices through the local bus. figure 11-2 also shows an example of the pci bridge mode, but the local bus arbitration is enabled, which allows a local cpu to control when the host can have access to the local bus. to access the local bus, the host must first request the bus and then wait until it is granted. figure 11-3 features an example of the conf iguration mode. in this mode, the cpu on the local bus configures and monitors the DS31256. in this mode, the host on the pci/custom bus cannot access the DS31256 and the pci/custom bus is only used to transfer hdlc packet data to and from the host. table 11-a lists all the local bus pins and their applications in both operating modes. the local bus operates only in a nonmultiplexed fashion; it is not capable of operating as a multiplexed bus. for both operating modes, the local bus can be set up for either intel or motorola type buses. this selection is made in hardware by connecting the lim pin high or low. table 11-a. local bus signals signal function pci bridge mode (lms = 0) configuration mode (lms = 1) ld[0:15] data bus input on read/output on write input on write/output on read la[0:19] address bus output input lwr (lr/ w ) bus write (read/write select) output input lrd ( lds ) bus read (data strobe) output input lbhe byte high enable output tri-stated lim intel/motorola select input input lint interrupt input output lms mode select input input lclk bus clock output tri-stated lrdy bus ready input ignored lcs chip select ignored input lhold ( lbr ) hold request (bus request) output tri-stated lhlda ( lbg ) hold acknowledge (bus grant) input ignored lbgack bus acknowledge output tri-stated note: signals shown in parentheses are active when motorola mode (lim = 1) is selected.
DS31256 256-channel, high-thro ughput hdlc controller 148 of 182 figure 11-1. bridge mode figure 11-2. bridge mode with arbitration enabled t1 / e1 framer or transceiver local bus DS31256 envoy host processor and main memory pci / custom bus t1 / e1 framer or transceiver t1 / e1 framer or transceiver t1 / e1 framer or transceiver t1 / e1 framer or transceiver local bus DS31256 envoy host processor and main memory pci / custom bus local cpu that handles the real-time tasks required by the t1 / e1 interfaces local ram & rom 1. request bus access 2. bus access granted 3. transaction occurs 1 2 3 t1 / e1 framer or transceiver t1 / e1 framer or transceiver t1 / e1 framer or transceiver
DS31256 256-channel, high-thro ughput hdlc controller 149 of 182 figure 11-3. configuration mode 11.1.1 pci bridge mode in pci bridge mode, data from the pci bus can be transferred to the local bus. the local bus acts as a ?master? and creates all the necessary signals to control the bus. the user must configure the local bus bridge mode control register (lbbmc ), which is described in section 11.2 . with 20 address lines, the local bus can address 1mb address space. the host on the pci bus determines where to map this 1mb address space within the 32-b it address space of the pci bus by configuring the base address in the pci conf iguration registers (section 10 ). bridge mode 8-bit and 16-bit access during a bus access by the host, the local bus can de termine how to map the four possible byte positions from/to the pci bus to/from the local bus data bus (ld) pins by examining the pcbe signals and the local bus width (lbw) control bit that resides in the local bus bridge mode control (lbbmc) register. if the local bus is used as an 8-bit bus (lbw = 1), then the host must only assert one of the pcbe signals. the pci data is mapped to/from the ld[7:0] signal lin es; the ld[15:0] signal lines remain inactive. the local bus block drives the a0 and a1 address lines according to the assertion of the pcbe signals by the host. see table 11-b for details. if the host asserts more than one of the pcbe signals when the local bus is configured as an 8-bit bus, then the local bus rejects the access and the pci block returns a target abort to the host. see section 10 for details about a target abort. t1 / e1 framer or transceiver local bus DS31256 envoy host processor and main memory pci / custom bus cpu configures and monitors ds3134 local ram & rom no a ccess a llowed only used to transfer hdlc data t1 / e1 framer or transceiver t1 / e1 framer or transceiver t1 / e1 framer or transceiver
DS31256 256-channel, high-thro ughput hdlc controller 150 of 182 table 11-b. local bus 8-bit width address, lbhe setting pcbe [3:0] a1 a0 lbhe 1110 0 0 1 1101 0 1 1 1011 1 0 1 0111 1 1 1 note 1: all other possible states for pcbe cause the device to return a target abort to the host. note 2: the 8-bit data picked from the pci bus is routed/sampled to/from the ld[7:0] signal lines. note 3: if no pcbe signals are asserted during an access, a target abort is not returned and no transaction occurs on the local bus. if the local bus is used as 16-bit bus, the lbw contro l bit must be set to 0. in 16-bit accesses, the host can either perform 16-bit access or an 8- bit access by asserting the appropriate pcbe signals ( table 11-c ). for 16-bit access, the host enables the combination of either pcbe0/pcbe1 or pcbe2/pcbe3 and the local bus block maps the word from/to the pc i bus to/from the ld[15:0] signals. for 8-bit access in the 16-bit bus mode, the host must assert just one of the pcbe0 to pcbe3 signals. if the host asserts a combination of pcbe signals not supported by the local bus, th e local bus rejects the access and the pci block returns a target abort to the host. see section 10 for details on a target abort. section 11.3 contains a number of timing examples for the local bus. table 11-c. local bus 16- bit width ad dress, ld, lbhe setting pcbe [3:0] 8/16 a1 a0 ld[15:8] ld[7:0] lbhe 1110 8 0 0 active 1 1101 8 0 1 active 0 1100 16 0 0 active active 0 1011 8 1 0 active 1 0111 8 1 1 active 0 0011 16 1 0 active active 0 note 1: all other possible states for pcbe cause the device to return a target abort to the host. note 2: the 16-bit data picked from the pci bus is routed/sampled to/from the ld[7:0] and ld[15:8] signal lines as shown. note 3: if no pcbe signals are asserted during an access, a target abort is not returned and no transaction occurs on the local bus. bridge mode bus arbitration in bridge mode, the local bus can arbitrate for bus access. in order for this feature to operate, the host must access the pci bridge mode control register (lbbmc) and enable it through the larbe control bit (the default is bus arbitration disabled). if bus arb itration is enabled, then, before a bus transaction can occur, the local bus first requests bus access by asserting the lhold (lbr ) signal and then waits for the bus to be granted from the local bus arbiter by sensing that the lhlda ( lbg ) has been asserted. if the host on the pci bus attempts a local bus access when the local bus is not granted by the local bus master ( lbgack is deasserted), the local bus block immediately informs the host by issuing a pci target retry that the local bus is busy and cannot be accessed at that time (in other words, come back later). see section 10 for details about the pci target retry. when this happens, the local bus block does not attempt the bus access and keeps the la, ld, lbhe , lwr (lr/ w ), and lrd ( lds ) signals tri-stated. if the host attempts a local bus access when the bus is busy, the local bus block requests bus access, and, after it has been granted, it seizes the bus for the time programmed into the local bus arbitration timer (lat0 to lat3 in the lbbmc register), which can be from 32 to 1,048,576 clocks. as long as the local bus has been granted and the arbitr ation timer has at least 16 clocks le ft, the host is allowed to access the local bus. see figure 11-4 and the timing examples in section 11.3 for more details.
DS31256 256-channel, high-thro ughput hdlc controller 151 of 182 bridge mode bus transaction timing when the local bus is operated in pci bridge mode, the bus transaction time can be determined either from an external ready signal ( lrdy ) or from the pci bridge mode control register (lbbmc), which allows a bus transaction time of 1 to 11 lclk cycles . if the total access time to the local bus exceeds 16 pclk cycles, the pci access times out and a pci target retry is sent to the host. this only occurs when lrdy has not been detected within 9 clocks. if this happens, the local bus error (lbe) status bit in the status master (sm) register is se t. additional details about the lbe status bit can be found in section 5 . more details about trans action timing can be found in figure 10-4 and the timing examples in section 11.3 . bridge mode interrupt in the pci bridge mode, the local bus can detect an external interrupt through the lint signal. if the local bus detects that the linta signal has been asserted, it then sets the lbint status bit in the status master (sm) register. setting this status bit can cause a hardware interrupt to occur at the pci bus through the pinta signal. this interrupt can be masked through the ism register. see section 5 for more details. 11.1.2 configuration mode in configuration mode, the local bus is used only to configure the device and obtain status information from the device. it is also used to configure the pci configuration registers and therefore the pci bus signal pidsel is disabled when the local bus is in the configuration mode. data cannot be passed from the local bus to the pci bus in this mode. the pci bus is only used as a high-speed i/o bus for the hdlc packet data. in this mode, bus arbitration, bus format, and the user-settable bus transaction time features are disabled. all bus accesses are based on 16- bit addresses and 16-bit data in this mode. the upper four addresses (la[19:16]) are ignored and 8- bit data accesses are not allowed. see section 13 for the ac timing requirements.
DS31256 256-channel, high-thro ughput hdlc controller 152 of 182 figure 11-4. local bus access flowchart pci host initiates a local bus access is arbitration enabled for the local bus? is the local bus granted? is the external local bus ready ( lrdy ) being used? normal access occurs local bus access progresses local bus access progresses timer expired? l rdy active? start 9 clock time r set the lbe status bi t no yes yes no no no yes yes no yes pci target retr y issued a re there 16 clocks remaining? no yes reques t the bus
DS31256 256-channel, high-thro ughput hdlc controller 153 of 182 11.2 local bus bridge mode control register description register name: lbbmc register description: local bus bridge mode control register address: 0040h note: this register can only be accessed through the pci bus and therefore only in the pci bridge mode. in configuration mode, this register cannot be accessed. it is set to all zeros upon a hardware reset issued through the prst pin. it is not affected by a software reset issued through the rst control bit in the master reset and id (mrid) register. bit # 7 6 5 4 3 2 1 0 name n/a lbw lrdy3 lrdy2 lrdy1 lrdy0 larbe lclke default 0 0 0 0 0 0 0 0 bit # 15 14 13 12 11 10 9 8 name n/a n/a n/a n/a lat3 lat2 lat1 lat0 default 0 0 0 0 0 0 0 0 note: bits that are underlined are read-only; all other bits are read-write. bit 0/local bus clock enable (lclke) 0 = tri-state the lclk output signal pin 1 = allow lclk to appear at the pin bit 1/local bus arbitration enable (larbe). when enabled, the lhold ( lbr ), lbgack , and lhlda ( lbg ) signal pins are active and the proper arbitration handshake sequence must occur for a proper bus transaction. when disabled, the lhold ( lbr ), lbgack , and lhlda ( lbg ) signal pins are deactivated and bus arbitration on the local bus is not invoked. also, the arbitration timer is enabled (see the description of the lat0 to lat3 bits) when larbe is set to 1. 0 = local bus arbitration is disabled 1 = local bus arbitration is enabled bit 2/local bus ready control bit 0 (lrdy0). lsb bit 3/local bus ready control bit 1 (lrdy1) bit 4/local bus ready control bit 2 (lrdy2) bit 5/local bus ready control bit 3 (lrdy3). msb. these control bits determine the duration of the local bus transaction in the pci bridge mode. the bus transaction can either be controlled through the external lrdy input signal or through a predetermined period of 1 to 11 lclk periods. 0000 = use the lrdy signal input pin to control the bus transaction 0001 = bus transaction is defined as 1 lclk period 0010 = bus transaction is defined as 2 lclk periods 0011 = bus transaction is defined as 3 lclk periods 0100 = bus transaction is defined as 4 lclk periods 0101 = bus transaction is defined as 5 lclk periods 0110 = bus transaction is defined as 6 lclk periods 0111 = bus transaction is defined as 7 lclk periods 1000 = bus transaction is defined as 8 lclk periods 1001 = bus transaction is defined as 9 lclk periods 1010 = bus transaction is defined as 10 lclk periods 1011 = bus transaction is defined as 11 lclk periods 1100 = illegal state 1101 = illegal state 1110 = illegal state 1111 = illegal state
DS31256 256-channel, high-thro ughput hdlc controller 154 of 182 bit 6/local bus width (lbw) 0 = 16 bits 1 = 8 bits bits 8 to 11/local bus arbitration timer setting (lat0 to lat3). these four bits determine the total time the local bus seizes the bus when it has been granted in th e arbitration mode (larbe = 1). this period is measured from lhlda ( lbg ) being detected to lbgack inactive. condition 33mhz pclk 25mhz pclk 0000 = when granted, hold the bus for 32 lclks 0.97  s 1.3  s 0001 = when granted, hold the bus for 64 lclks 1.9  s 2.6  s 0010 = when granted, hold the bus for 128 lclks 3.9  s 5.1  s 0011 = when granted, hold the bus for 256 lclks 7.8  s 10.2  s 0100 = when granted, hold the bus for 512 lclks 15.5  s 20.5  s 1101 = when granted, hold the bus for 262,144 lclks 7.9ms 10.5ms 1110 = when granted, hold the bus for 524,288 lclks 15.9ms 21.0ms 1111 = when granted, hold the bus for 1,048,576 lclks 31.8ms 41.9ms
DS31256 256-channel, high-thro ughput hdlc controller 155 of 182 11.3 examples of bus timing for local bus pci bridge mode operation figure 11-5. 8-bit read cycle intel mode (lim = 0) arbitration enabled (larbe = 1) bus transaction time = 4 lclk (lrdy = 0100) an attempted access by the host causes the local bus to request the bus. if bus access has not been granted ( lbgack deasserted), the timing shown at the top of th e page applies, with lhold being asserted. once lhlda is detected, the local bus grabs the bus for 32 to 1,048,576 clocks and then releases it. if the bus has already been granted ( lbgack asserted), the timing shown at the bottom of the page applies. lclk lhold lhlda l bgac k 32 to 1,048,576 lclks la[19:0] ld[7:0] ld[15:8] l r d l w r a ddress valid l bh e tri-state tri-state tri-state tri-state lclk 1234 note: la, ld, lbh e , lw r , and lrd are tri-stated.
DS31256 256-channel, high-thro ughput hdlc controller 156 of 182 figure 11-6. 16-bit write cycle intel mode (lim = 0) arbitration enabled (larbe = 1) bus transaction time = 4 lclk (lrdy = 0100) an attempted access by the host causes the local bus to request the bus. if bus access has not been granted ( lbgack deasserted), the timing shown at the top of th e page occurs, with lhold being asserted. once lhlda is detected, the local bus grabs the bus for 32 to 1,048,576 clocks and then releases it. if the bus has already been granted ( lbgack asserted), the timing shown at the bottom of the page applies. lclk lhold lhlda l bgac k 32 to 1,048,576 lclks la[19:0] ld[7:0] ld[15:8] l r d l w r a ddress valid l bh e data valid data valid tri-state tri-state tri-state tri-state tri-state tri-state lclk 1234 note: la, ld, lbh e , lw r , and lrd are tri-stated.
DS31256 256-channel, high-thro ughput hdlc controller 157 of 182 figure 11-7. 8-bit read cycle intel mode (lim = 0) arbitration disabled (larbe = 0) bus transaction time = timed from lrdy (lrdy = 0000) lcl k la[19:0] ld[7:0] ld[15:8] l w r l r d address valid l bh e l rd y 12345678910 note: the lrdy signal must be detected by the 9th lclk or the bus access attempted by the host is unsuccessful and the lbe status bit is set.
DS31256 256-channel, high-thro ughput hdlc controller 158 of 182 figure 11-8. 16-bit write (only upper 8 bits active) cycle intel mode (lim = 0) arbitration disabled (larbe = 0) bus transaction time = timed from lrdy (lrdy = 0000) lclk la[19:0] ld[7:0] ld[15:8] l w r l r d a ddress valid l bh e l rd y data valid 1234567 8910 note: the lrdy signal must be detected by the 9th lclk or the bus access attempted by the host is unsuccessful and the lbe status bit is set.
DS31256 256-channel, high-thro ughput hdlc controller 159 of 182 figure 11-9. 8-bit read cycle motorola mode (lim = 1) arbitration enabled (larbe = 1) bus transaction time = 6 lclk (lrdy = 0110) an attempted access by the host causes the local bus to request the bus. if bus access has not been granted ( lbgack deasserted), the timing shown at the top of the page occurs, with lbr being asserted. once lbg is detected, the local bus grabs the bus for 32 to 1,048,576 clocks and then releases it. if the bus has already been granted ( lbgack asserted), the timing shown at the bottom of the page applies. lclk l b r l b g l bgac k 32 to 1,048,576 lclks la[19:0] ld[7:0] ld[15:8] lr /w l d s a ddress valid data valid l bh e tri-state tri-state tri-state tri-state lclk 123456 note: la, ld, lbh e , ld s , and lr / w are tri-stated.
DS31256 256-channel, high-thro ughput hdlc controller 160 of 182 figure 11-10. 8-bit write cycle motorola mode (lim = 1) arbitration enabled (larbe = 1) bus transaction time = 6 lclk (lrdy = 0110) an attempted access by the host causes the local bus to request the bus. if bus access has not been granted ( lbgack deasserted), the timing shown at the top of the page occurs, with lbr being asserted. once lbg is detected, the local bus grabs the bus for 32 to 1,048,576 clocks and then releases it. if the bus has already been granted ( lbgack asserted), the timing shown at the bottom of the page applies. lclk l b r l b g l bgac k 32 to 1,048,576 lclks la[19:0] ld[7:0] ld[15:8] lr/ w l d s a ddress valid data valid l bh e tri-state tri-state tri-state tri-state tri-state tri-state lclk 123456 note: la, ld, lbh e , ld s , and lr/ w are tri-stated.
DS31256 256-channel, high-thro ughput hdlc controller 161 of 182 figure 11-11. 16-bit read cycle motorola mode (lim = 1) arbitration disabled (larbe = 0) bus transaction time = timed from lrdy (lrdy = 0000) lcl k la[19:0] ld[7:0] ld[15:8] lr/ w l d s a ddress valid l bh e l rd y 1234567 89 10 note: the lrdy signal must be detected by the 9th lclk or the bus access attempted by the host is unsuccessful and the lbe status bit is set
DS31256 256-channel, high-thro ughput hdlc controller 162 of 182 figure 11-12. 8-bit write cycle motorola mode (lim = 1) arbitration disabled (larbe = 0) bus transaction time = timed from lrdy (lrdy = 0000) lcl k la[19:0] ld[7:0] ld[15:8] lr/ w l d s a ddress valid l bh e l rd y tri-state data valid 12345678910 note: the lrdy signal must be detected by the 9th lclk or the bus access attempted by the host is unsuccessful and the lbe status bit is set.
DS31256 256-channel, high-thro ughput hdlc controller 163 of 182 12. jtag 12.1 jtag description the DS31256 supports the standard instruction codes sample/preload, bypass, and extest. optional public instructions included are highz, clamp, and idcode. figure 12-1 is a block diagram. the DS31256 contains the following items, which meet the requirements set by the ieee 1149.1 standard test access port a nd boundary scan architecture: test access port (tap) tap controller instruction register bypass register boundary scan register device identification register the tap has the necessary interface pins jtclk, jtrst , jtdi, jtdo, and jtms. details about these pins can be found in section 3.4 . refer to ieee 1149.1-1990, ieee 1149.1a-1993, and ieee 1149.1b- 1994 for details about the boundary scan architecture and the tap. figure 12-1. block diagram boundary scan register identification re g i s ter bypass register instruction register test access port co ntr o ller mu x select tri-state jtdi 10 k jtms 10k jtcl k j trs t 10 k jtdo
DS31256 256-channel, high-thro ughput hdlc controller 164 of 182 12.2 tap controller state machine description this section details the operation of the tap controller state machine. see figure 12-2 for details about each of the states. the tap controller is a finite state machine, which responds to the logic level at jtms on the rising edge of jtclk. figure 12-2. tap cont roller state machine test-logic-rese t run-test/idle selec t dr-scan 1 0 capture-dr 1 0 shift-dr 0 1 exit1-dr 1 0 pause-d r 1 exit2-dr 1 update-dr 0 0 1 selec t ir-scan 1 0 capture-ir 0 shift-i r 0 1 exit1-ir 1 0 pause-i r 0 exit2-ir 1 update-ir 0 0 1 0 0 1 0 1 0 1
DS31256 256-channel, high-thro ughput hdlc controller 165 of 182 test-logic-reset. the tap controller is in the test-l ogic-reset state upon DS31256 power-up. the instruction register contains the idcode in struction. all system logic on the DS31256 operates normally. run-test-idle. run-test-idle is used between scan operations or during specific tests. the instruction and test registers remain idle. select-dr-scan . all test registers retain their previous state. with jtms low, a rising edge of jtclk moves the controller into the capture-dr state and initiates a scan sequence. jtms high moves the controller to the select-ir-scan state. capture-dr . data can be parallel loaded into the test data registers selected by the current instruction. if the instruction does not call for a parallel load or the selected register does not allow parallel loads, the test register remains at its current value. on the rising edge of jtclk, the controller goes to the shift-dr state if jtms is low or it goes to the exit1-dr state if jtms is high. shift-dr . the test data register selected by the current instruction is connected between jtdi and jtdo and shifts data one stage toward its serial output on each rising edge of jtclk. if a test register selected by the current instruction is not placed in the serial path, it maintains its previous state. exit1-dr. while in this state, a rising edge on jtclk with jtms high puts the controller in the update- dr state, which terminates the scanning process. a rising edge on jtclk with jtms low puts the controller in the pause-dr state. pause-dr. shifting of the test registers is halted while in this state. all test registers selected by the current instruction retain their previous states. the controller remains in this state while jtms is low. a rising edge on jtclk with jtms high puts the controller in the exit2-dr state. exit2-dr. while in this state, a rising edge on jtclk with jtms high puts the controller in the update- dr state and terminates the scanning process. a rising edge on jtclk with jtms low enters the shift- dr state. update-dr. a falling edge on jtclk while in the update-dr state latches the data from the shift register path of the test registers into the data output latches. this prevents changes at the parallel output because of changes in the shift register. a rising edge on jtclk with jtms low puts the controller in the run-test-idle state. with jtms high, the controller enters the select-dr-scan state. select-ir-scan. all test registers retain their previous states. the instruction register remains unchanged during this state. with jtms low, a rising edge on jtclk moves the controller into the capture-ir state and initiates a scan sequence for the instruction register. jtms high during a rising edge on jtclk puts the controller back into the test-logic-reset state. capture-ir. the capture-ir state is used to load the shift re gister in the instruction register with a fixed value. this value is loaded on the rising edge of jt clk. if jtms is high on the rising edge of jtclk, the controller enters the exit1-ir state. if jtms is low on the rising edge of jtclk, the controller enters the shift-ir state. shift-ir. in this state, the shift register in the instruction register is connected between jtdi and jtdo and shifts data one stage for every rising edge of jt clk toward the serial output . the parallel register as
DS31256 256-channel, high-thro ughput hdlc controller 166 of 182 well as all test registers remain at their previous states. a rising edge on jtclk with jtms high moves the controller to the exit1-ir state. a rising edge on jtclk with jtms low keeps the controller in the shift-ir state while moving data one stag e through the instruction shift register. exit1-ir. a rising edge on jtclk with jtms low puts the c ontroller in the pause-ir state. if jtms is high on the rising edge of jtclk, the controller ente rs the update-ir state and terminates the scanning process. pause-ir. shifting of the instruction register is halted temporarily. with jtms high, a rising edge on jtclk puts the controller in the exit2-ir state. the controller remains in the pause-ir state if jtms is low during a rising edge on jtclk. exit2-ir. a rising edge on jtclk with jtms high puts the controller in the update-ir state. the controller loops back to the shift-ir state if jtms is low during a rising edge of jtclk in this state. update-ir. the instruction shifted into the instruction shift register is latched into the parallel output on the falling edge of jtclk as the controller enters this state. once latched, this instruction becomes the current instruction. a rising edge on jtclk with jtms low puts the controller in the run-test-idle state. with jtms high, the controller enters the select-dr-scan state. 12.3 instruction regist er and instructions the instruction register contains a shift register as we ll as a latched parallel output, and is 3 bits in length. when the tap controller enters the shift-ir state, the instruction shift register is connected between jtdi and jtdo. while in the shift-ir state, a rising edge on jtclk with jtms low shifts data one stage toward the serial output at jtdo. a rising edge on jtclk in the exit1-ir state or the exit2-ir state with jtms high moves the controller to the update-ir state. the falling edge of that same jtclk latches the data in the instruction shift register to the instruction parallel output. table 12-a shows instructions supported by the DS31256 and their respec tive operational binary codes. table 12-a. instruction codes instruction selected register instruction codes sample/preload boundary scan 010 bypass bypass 111 extest boundary scan 000 clamp bypass 011 highz bypass 100 idcode device identification 001 sample/preload. sample/preload is a mandatory instruction for the ieee 1149.1 specification that supports two functions. the dig ital i/os of the DS31256 can be sampled at the boundary scan register without interfering with the normal operation of the devi ce by using the capture- dr state. sample/preload also allows the DS31256 to shift data into the boundary scan register through jtdi using the shift-dr state. extest. extest allows testing of all interconn ections to the DS31256. when the extest instruction is latched in the instruction register, the following actions occur. once enabled through the update-ir state, the parallel outputs of all digital output pins are driven. the boundary scan register is connected between jtdi and jtdo. the capture-dr samples all digital inputs into the boundary scan register.
DS31256 256-channel, high-thro ughput hdlc controller 167 of 182 bypass. when the bypass instruction is latched into the parallel instruction register, jtdi connects to jtdo through the 1-bit bypass test register. this allows data to pass from jtdi to jtdo without affecting the device?s normal operation. idcode. when the idcode instruction is latched into the parallel instruction register, the identification test register is selected. the device identification code loads into the identification register on the rising edge of jtclk following entry into the capture-dr state. shift-dr can be used to shift the identification code out serially through jtdo. during test-logic-reset, the identification code is forced into the instruction register?s parallel output. the device id code always has 1 in the lsb position. the next 11 bits identify the manufacturer?s jedec numbe r and number of continuation bytes followed by 16 bits for the device and 4 bits for the ve rsion. the device id code for the DS31256 is 00006143h . 12.4 test registers ieee 1149.1 requires a minimum of two test regist ers?the bypass register and the boundary scan register. an optional identification register has b een included in the DS31256 design that is used in conjunction with the idcode instruction and the test-logic-reset state of the tap controller. bypass register this is a single 1-bit shift register used in conjunction with the bypass, clamp, and highz instructions that provides a shor t path between jtdi and jtdo. boundary scan register this register contains both a shift register path and a latched parallel output for all control cells and digital i/o cells. visit www.maxim-ic.com/telecom for a downloadable bdsl file that contains all bit identity and definition information. identification register the identification register contains a 32-bit shift regi ster and a 32-bit latched pa rallel output. this register is selected during the idcode instruction and when the tap controller is in the test-logic-reset state.
DS31256 256-channel, high-thro ughput hdlc controller 168 of 182 13. ac characteristics absolute maximum ratings voltage on any lead with respect to v ss (except v dd ) -0.3v to 5.5v supply voltage (v dd ) with respect to v ss -0.3v to 3.63v operating temperature/ambient temperature under bias 0c to +70c junction temperature under bias  125c storage temperature range -55c to +125c soldering temperature range see ipc/jedec j-std-020a specification esd tolerance (note 1) class 2 (2000v 4000v hbm: 1.5k  , 100pf) stresses beyond those listed under ?absolute maximum ratings? may cause permanent damage to the device. these are stress rating s only, and functional operation of the device at these or any other conditions beyond those indicated in the operational sections of t he specifications is not implied. exposure to absolute maximum rating conditions for extended periods may affect device reliability. recommended dc operating conditions (t a = 0c to +70c) parameter symbol conditions min typ max units logic 1 v ih (notes 2, 3) 1.8 5.5 v logic 0 v il (note 2) -0.3 +0.8 v supply v dd 3.0 3.6 v dc characteristics (v dd = 3.0v to 3.6v, t a = 0c to +70c.) parameter symbol conditions min typ max units supply current at v dd = 3.6v i dd (note 4) 500 770 ma lead capacitance c io 7 pf schmitt hysteresis v th 0.6 v input leakage i il (note 5) -10 +10  a input leakage (with pullups) i ilp (note 5) -500 +500  a output leakage i lo (note 6) -10 +10  a output current (2.4v) i oh -4.0 ma output current (0.4v) i ol +4.0 ma output capacitance c out (note 1) 25 pf output capacitance c outb (note 1) 50 pf note 1: c outb refers to bus-related outputs (pci and local bus); c out refers to all other outputs. note 2: assumes a reasonably noise-free environment. note 3: the pci 2.1 specification states that v ih should be v dd /2 in a 3.3v signaling environment, and 2.0v in a 5v signaling environment. note 4: measured 550ma with rc0 to rc15 and tc0 to tc15 = 2.048mhz, pclk = 33mhz, constant traffic on all ports. note 5: 0v < v in < v dd note 6: outputs in tri-state. note 7: the typical values listed above are not production tested. note 8: dallas semiconductor communications devices are tested in accordance with esda stm 5.1-1998.
DS31256 256-channel, high-thro ughput hdlc controller 169 of 182 ac characteristics: layer 1 ports (v dd = 3.0v to 3.6v, t a = 0c to +70c.) parameter symbol conditions min typ max units (note 9) 100 rc/tc clock period t1 (note 10) 19 ns (note 9) 40 rc/tc clock low time t2 (note 10) 8 ns (note 9) 40 rc/tc clock high time t3 (note 10) 8 ns (note 9) 5 rd setup time to the falling edge or rising edge of rc t4 (note 10) 2 ns rs/ts setup time from the falling edge or rising edge of rc/tc t4 (note 9) 5 t1 - 10 ns (note 9) 5 rd hold time from the falling edge or rising edge of rc t5 (note 10) 5 ns rs/ts hold time from the falling edge or rising edge of rc/tc t5 (note 9) 5 t1 - 10 ns (note 9) 5 25 delay from the rising edge or falling edge of tc to data valid on td t6 (note 10) 3 15 ns note 9: ports 0 to 15 in applications running up to 10mhz. note 10: port 0, 1, or 2 running in applications up to 52mhz. note 11: aggregate, maximum bandwidth and port speed for the DS31256 are directly proportional to pclk frequency. throughput measurements are made at pclk = 33mhz. figure 13-1. layer 1 port ac timing diagram rc[n] / tc[n] normal mode rd[n] / rs[n] / ts[n] td[n] t4 t5 t6 t1 t2 t3 rc[n] / tc[n] inverted mode l1 ac note: tc and rc are independent of each other. in the above timing diagram, all the signals beginning with ?t? reference the transmit clock tc; all signals beginning with ?r? reference the receive clock rc.
DS31256 256-channel, high-thro ughput hdlc controller 170 of 182 ac characteristics: local bus in bridge mode (lms = 0) (v dd = 3.0v to 3.6v, t a = 0c to +70c.) parameter symbol conditions min typ max units delay time from the rising edge of pclk to output valid from tri-state t1 7 17 ns delay time from the rising edge of pclk to tri-state from output valid t2 7 15 ns delay time from the rising edge of pclk to output valid from an already active drive state t3 6 14 ns ld[15:0] setup time to the rising edge of pclk t4 1 ns ld[15:0] hold time from the rising edge of pclk t5 5 ns input setup time to the rising edge of pclk t6 1 ns input hold time from the rising edge of pclk t7 5 ns delay time from the rising edge of pclk to the rising edge of lclk t8 4 7 ns delay time from the falling edge of pclk to the falling edge of lclk t9 5 8 ns figure 13-2. local bus bridge mode (lms = 0) ac timing diagram data valid pclk l int , lrd y lhlda ( lbg ) ld[15:0] la[19:0], lw r (lr/ w ), l rd ( lds ), lbhe la[19:0], ld[15:0], lbh e , l w r (lr/ w ), lrd (ds) data valid tri-state data valid la[19:0], lw r (lr/ w ), l rd (ds), lhold ( lb r ), l bgac k t8 lclk t9 tri-state t3 t5 t4 t6 t7 t2 t1
DS31256 256-channel, high-thro ughput hdlc controller 171 of 182 ac characteristics: local bus in configuration mode (lms = 1) (v dd = 3.0v to 3.6v, t a = 0c to +70c.) parameter symbol conditions min typ max units setup time for la[15:0] valid to lcs active t1 0 ns setup time for lcs active to either lrd , lwr , or lds active t2 0 ns delay time from either lrd or lds active to ld[15:0] valid t3 (note 12) 75 ns hold time from either lrd , lwr , or lds inactive to lcs inactive t4 0 ns hold time from either lrd or lds inactive to ld[15:0] tri-state t5 5 20 ns wait time from either lwr or lds active to latch ld[15:0] t6 (note 13) 75 ns ld[15:0] setup time to either lwr or lds inactive t7 10 ns ld[15:0] hold time from either lwr or lds inactive t8 2 ns la[15:0] hold from either lwr , lrd , or lds inactive t9 5 ns lrd , lwd , or lds inactive time t10 (note 14) 65 ns note 12: given value for 33mhz pclk. calculated as 1.5 x (pclk period) + 30ns note 13: given value for 33mhz pclk. calculated as 2 x (pclk period) + 15ns note 14: given value for 33mhz pclk. calculated as 2 x (pclk period) + 5ns
DS31256 256-channel, high-thro ughput hdlc controller 172 of 182 figure 13-3. local bus configuration m ode (lms = 1) ac timing diagrams t9 a ddress valid data valid la[15:0] ld[15:0] l w r l c s l r d t1 t2 t3 t4 t5 t9 t10 intel read cycle a ddress valid la[15:0] ld[15:0] l r d l c s l w r t1 t2 t6 t4 t7 t8 t10 intel write cycle
DS31256 256-channel, high-thro ughput hdlc controller 173 of 182 figure 13-4. local bus configuration m ode (lms = 1) ac timing diagrams (continued) a ddress valid data valid la[15:0] ld[15:0] lr/ w l c s l d s t1 t2 t3 t4 t5 t9 t10 motorola read cycle motorola write cycle a ddress valid la[15:0] ld[15:0] lr/ w l c s l d s t1 t2 t6 t4 t7 t8 t9 t10
DS31256 256-channel, high-thro ughput hdlc controller 174 of 182 ac characteristics: pci bus interface (v dd = 3.0v to 3.6v, t a = 0c to +70c.) parameter symbol conditions min typ max units pclk period t1 (note 15) 30 40 ns pclk low time t2 12 ns pclk high time t3 12 ns all pci inputs and i/o setup time to the rising edge of pclk t4 7 ns all pci inputs and i/o hold time from the rising edge of pclk t5 0 ns delay from the rising edge of pclk to data valid on all pci outputs and i/o t6 (note 16) 2 11 ns delay from the rising edge of pclk to tri-state on all pci outputs and i/o t7 28 ns delay from the rising edge of pclk to active from tri-state on all pci outputs and i/o t8 2 ns note 15: aggregate, maximum bandwidth and port speed for the DS31256 are directly proportional to pclk frequency. ensure that pclk is 33mhz for maximum throughput. note 16: the pci extension signals pablast, pxas, and pxds have a 15ns max. these signals are not part of the pci specification. figure 13-5. pci bus inte rface ac timing diagram pclk pci in p ut & i/o pci out p ut & i/o pci out p ut & i/o to tri-state pci out p ut & i/o from tri-state tri-state tri-state t4 t5 t6 t7 t8 t1 t2 t3 data valid
DS31256 256-channel, high-thro ughput hdlc controller 175 of 182 ac characteristics: jtag test port interface (v dd = 3.0v to 3.6v, t a = 0c to +70c.) parameter symbol conditions min typ max units jtclk clock period t1 1000 ns jtclk clock low time t2 400 ns jtclk clock high time t3 400 ns jtms/jtdi setup time to the rising edge of jtclk t4 50 ns jtms/jtdi hold time from the rising edge of jtclk t5 50 ns delay time from the falling edge of jtclk to data valid on jtdo t6 2 50 ns figure 13-6. jtag test port interface ac timing diagram 14. revision history revision description 112102 new product release 073103 corrected various typogra phical errors, including: lifted some usage restrictions changed maximum number of t1 links from 64 to 60 added u12 as a ground in table 3-a removed pci t5 and vih exceptions to pci 2.1 compliance changed 8191 to 8188 in figure 9-1 to be dword consistent changed logic 1 minimum from 2.2v to 1.8v in section 13 added typical supply current and increase the maximum in section 13 added typical supply current and increase the maximum in section 13 removed t5 compliance issue and added note 16 in section 13, pci added chapter 15, th ermal properties update recommended components in section 17: applications jtcl k jtms/jtdi jtdo t4 t5 t6 t1 t2 t3
DS31256 256-channel, high-thro ughput hdlc controller 176 of 182 15. package information (the package drawing(s) in this data sheet may not reflect the most current specifications. for the latest package outline info rmation, go to www.maxim-ic.com/dallaspackinfo .)
DS31256 256-channel, high-thro ughput hdlc controller 177 of 182 16. thermal characteristics table 16-a. thermal properties, natural convection parameter conditions min typ max units ambient temperature (note 1) 0 +70c  c junction temperature 0 +125c  c theta - ja (  ja ), still air (note 2) 15.4  c/w psi-jb (  jb ), still air 7.03  c/w psi-jt (  jt ), still air 0.07  c/w note 1: the package is mounted on a four - layer jedec standard test board with no airflow and dissipating maximum power. note 2: theta - ja (  ja ) is the junction-to-ambient thermal resistance, when the package is mounted on a four - layer jedec standard test board with no airflow and dissipating maximum power. table 16-b. thermal properties vs. airflow forced air (m/s) theta-ja (  ja ) psi-jb (  jb ) psi-jt (  jt ) 0 15.4  c/w 7.03  c/w 0.07  c/w 1 13.0  c/w 6.77  c/w 0.40  c/w 2.5 11.9  c/w 6.53  c/w 0.57  c/w figure 16-1. 27mm x 27mm pbga with 256 balls, 2oz planes, +70  c ambient, under natural convection at 3.0w
DS31256 256-channel, high-thro ughput hdlc controller 178 of 182 17. applications this section describes some possible applicat ions for the DS31256. there are numerous potential configurations but only a few are shown. users are enco uraged to contact the factory for support of their particular app lication. email telecom.support@dalsemi.com or visit our website at www.maxim-ic.com/telecom for more information. the t1 and e1 channelized application examples in th is section are one of two types. the first type is where a single t1 or e1 data stream is routed to and from the DS31256. this is represented as a thin arrow in the application examples ( figure 17-1 ). figure 17-2 shows the electrical connections. the second type is where four t1 or e1 data streams have been tdm into a single 8.192mhz data stream, which is routed to and from the DS31256. this type is represented as a thick arrow in figure 17-1 . figure 17-3 shows the electrical connections. figure 17-1. application drawing key figure 17-2. single t1/e1 line connection 1 x single t1 or e1 line at 1.544mhz or 2.048mhz 4 x quad (4) t1 or 31 lines byte interleaved at 8.192mhz rclk rser rsync tclk tser tsync rc rd rs tc ts td DS31256 envoy dallas framer or transceiver (elastic stores disabled) note: a looped timed application is shown. the transmit clock may be decoupled from the receive in timing master applications.
DS31256 256-channel, high-thro ughput hdlc controller 179 of 182 figure 17-3. quad t1/e1 connection 17.1 16 port t1 or e1 with 256 hdlc channel support figure 17-4 shows an application where 16 t1 or e1 links are framed and interfaced to a single DS31256. the t1 lines can be either clear-channel or ch annelized. the ds21q55 quad t1/e1/j1 single-chip transceiver performs the line interface function and frames to the t1/e1/j1 line. figure 17-4. 16-port t1 application DS31256 envoy ds21455 transceive r port 0 port 1 port 2 port 3 port 4 port 5 port 6 port 7 port 8 port 9 port 10 port 11 port 12 port 13 port 14 port 15 four fou r fou r fou r t1 or e1lines ds21455 transceive r ds21455 transceive r ds21455 quad t1/e1 transceive r quad t1/e1 quad t1/e1 quad t1/e1 t1 or e1lines t1 or e1lines t1 or e1lines
DS31256 256-channel, high-thro ughput hdlc controller 180 of 182 17.2 dual t3 with 256 hdlc channel support figure 17-5 shows an application where two t3 lines are interfaced to a single DS31256. the t3 lines are demultiplexed by ds3112 m13 devices and passed to the ds21ff42 4 x 4 16-channel t1 framer and ds21ft42 4 x 3 12-channel t1 framer devices. th e t1 framers locate the frame and multiframe boundaries and interface to the DS31256 by aggregating four t1 lines into a single 8.192mhz data stream, which then flows into and out of the ds 31256. the t1 lines can be either clear channel or channelized. figure 17-5. dual t3 application DS31256 envoy ds21ff42 4 x 4 16-channel t1 framer ds21ft42 4 x 3 12-channel t1 framer ds21ff42 4 x 4 16-channel t1 frame r ds21ft42 4 x 3 12-channel t1 frame r ds3112 m13 interface 1 2 16 t3 line #1 t3 line #2 port 0 port 1 port 2 port 3 17 18 28 port 4 port 5 port 6 port 7 1 2 16 17 18 28 port 8 port 9 port 10 port 11 port 12 port 13 port 14 port 15 ds3112 m13 interface ds3152 dual t3/e3 liu
DS31256 256-channel, high-thro ughput hdlc controller 181 of 182 17.3 single t3 with 512 hdlc channel support figure 17-6 shows an application where a t3 line is interfaced to two DS31256s. the t3 line is demultiplexed by the m13 block and passed to the ds21ff42 and ds21ft42 devices. the t1 framers locate the frame and multiframe boundaries and interface to the DS31256. aggregating four t1 lines into a single 8.192mhz data stream is not required si nce the DS31256 has enough physical ports to support the application, but aggregation c ould be done to cut down on the number of electrical connections between the DS31256 and the t1 framers. the t1 lines can be either clear channel or channelized. figure 17-6. t3 applicat ion (512 hdlc channels) DS31256 envoy #1 ds21ff42 4 x 4 16-channel t1 frame r ds21ft42 4 x 3 12-channel t1 framer ds3112 m13 interface 1 2 16 port 0 port 1 port 2 port 3 17 18 28 port 4 port 5 port 6 port 7 port 8 port 9 port 10 port 11 port 12 port 13 port 14 port 15 port 0 port 1 port 2 port 3 port 4 port 5 port 6 port 7 port 8 port 9 port 10 port 11 port 12 port 13 port 14 port 15 DS31256 envoy #2
DS31256 256-channel, high-thro ughput hdlc controller maxim/dallas semiconductor cannot assume responsibility for use of any circuitry other than circuitry entirely embodied in a ma xim/dallas semiconductor product. no circuit patent licenses are implied. maxim/dallas semiconductor reserves the right to change the circuitry and specification s without notice at any time. maxim integrated products, 120 san gabriel drive, sunnyvale, ca 94086 408-737-7600 ? 2003 maxim integrated products  printed usa 182 of 182 17.4 single t3 with 672 hdlc channel support figure 17-7 shows an application where a fully channelized t3 line is interfaced to three DS31256s. the t3 line is demultiplexed by the m13 block and passed to the ds21ff42 and ds21ft42 devices. the t1 framers locate the frame and multiframe boundaries and interface to the DS31256. aggregating four t1 lines into a single 8.192mhz data stream is not re quired since the DS31256 has enough physical ports to support the applicationm, but aggregation could be done to cut down on the number of electrical connections between the DS31256 and the t1 framers. the t1 lines can be either clear channel or channelized. figure 17-7. t3 applicat ion (672 hdlc channels) DS31256 envoy #1 (supports 10 t1 lines) ds21ff42 four x four 16-channel t1 framer ds21ft42 four x three 12-channel t1 framer m13 interface 1 2 16 port 0 port 1 port 2 port 3 17 18 28 port 4 port 5 port 6 port 7 port 8 port 9 port 10 port 11 port 12 port 13 port 14 port 15 port 0 port 1 port 2 port 3 port 4 port 5 port 6 port 7 port 8 port 9 port 10 port 11 port 12 port 13 port 14 port 15 port 0 port 1 port 2 port 3 port 4 port 5 port 6 port 7 port 8 port 9 port 10 port 11 port 12 port 13 port 14 port 15 ds3112 DS31256 envoy #2 (supports 10 t1 lines) DS31256 envoy #3 (supports 8 t1 lines)


▲Up To Search▲   

 
Price & Availability of DS31256

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X